2
Google 막대 차트에서 툴팁을 사용하려고하는데 내 데이터 테이블의 맨 위 행에 no가 있으면 내 툴팁이 작동하는 이상한 문제가 발생합니다. 그것의 툴팁.Google Charts 툴팁은 툴팁이없는 첫 번째 행에서만 작동합니다.
나는이 작업을 수행 할 때 차트를 렌더링하지 않습니다 그 여분의 행 차종을 추가하는 이유
function drawVisualization() {
// Create and populate the data table.
var data = google.visualization.arrayToDataTable([
['Report','Ineffective', 'Developing', 'Effective', 'Highly Effective'],
['Growth Rating',{v:18, f:'tooltip text'},{v:12, f:'tooltip text'},{v:66, f:'tooltip text'},{v:4, f:'tooltip text'}],
['Composite Rating',{v:6, f:'tooltip text'},{v:12, f:'tooltip text'},{v:58, f:'tooltip text'},{v:25, f:'tooltip text'}]
]);
// Create and draw the visualization.
new google.visualization.BarChart(document.getElementById('chart_div')).
draw(data,
{title:"TITLE",
colors: ['#638FBC','#FFE17C','#FFA87C','#204C7A'],
hAxis: {title: "Percent of Educators", viewWindow:{max:105, min:0}, titleTextStyle: {italic: false}},
chartArea: {width: "60%"},
isStacked: true}
);
}
을하지만 이렇게하면 차트가 잘 렌더링
function drawVisualization() {
// Create and populate the data table.
var data = google.visualization.arrayToDataTable([
['Report','Ineffective', 'Developing', 'Effective', 'Highly Effective'],
['Empty', 0 , 0 , 0 , 0 ],
['Growth Rating',{v:18, f:'tooltip text'},{v:12, f:'tooltip text'},{v:66, f:'tooltip text'},{v:4, f:'tooltip text'}],
['Composite Rating',{v:6, f:'tooltip text'},{v:12, f:'tooltip text'},{v:58, f:'tooltip text'},{v:25, f:'tooltip text'}]
]);
// Create and draw the visualization.
new google.visualization.BarChart(document.getElementById('chart_div')).
draw(data,
{title:"TITLE",
colors: ['#638FBC','#FFE17C','#FFA87C','#204C7A'],
hAxis: {title: "Percent of Educators", viewWindow:{max:105, min:0}, titleTextStyle: {italic: false}},
chartArea: {width: "60%"},
isStacked: true}
);
난 몰라 그것은 작동합니다.
도움을 주시면 감사하겠습니다.
나는이 두 번 upvote 수 :) – Novarg