javascript - How to use getChartLayoutInterface() with a Pie Chart for dynamic positioning in Google Charts? -
i attempting dynamically render element on google chart. supposedly supported api chart types.
i copied sample code google charts
i modified options appropriate pie chart. changed line
var chart = new google.visualization.linechart(document.getelementbyid('line-chart-marker')); to call constructor piechart instead. read rest of sample code , nothing else (supposedly) specific linechart. google charts api shows piechart contains same methods used in linechart example.
however, not work piechart. console log, getchartlayoutinterface() still returns valid object. line
document.queryselector('.overlay-marker').style.top = math.floor(cli.getylocation(datatable.getvalue(5, 1))) - 50 + "px"; and similar line x location appear root of problem, these calls cli.getylocation(datatable.getvalue(5, 1)) return "undefined" whereas in linechart implementation return valid positions numbers. insight appreciated.
Comments
Post a Comment