javascript - Google Materials Charts (Scatter) not showing trendlines or tooltips -


i'm using google charts, materials charts running in ie v11, , when things trendlines , tooltips no longer work. same happens if add column {type: 'string', role: 'tooltip'}, nothing appears. if change

'packages':['scatter']

to

'packages':['corechart']

and

google.charts.scatter(...);

to

google.visualization.scatterchart(...);

then works listed in documentation. don't know missing here. below example of trendlines not working. i've searched other questions can't find answer.

<script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript">     google.load('visualization', '1.1', {'packages':['scatter']});     google.setonloadcallback(drawchart);      function drawchart() {         var data = new google.visualization.datatable();         data.addcolumn('date', 'date');         data.addcolumn('number', 'y');          data.addrows([             [new date(2015, 0, 7), 2],             [new date(2015, 0, 7), 10],             [new date(2015, 1, 2), 3],             [new date(2015, 1, 3), 4],             [new date(2015, 2, 9), 2]         ]);          var chart = new google.charts.scatter(document.getelementbyid('chart'));          var options = {              trendlines: {                 0: {                     type: 'linear',                     color: 'black',                     linewidth: 2,                     opacity: 0.3,                     showr2: true,                     visibleinlegend: true                 }             }         };          chart.draw(data, options);     } </script> 

after looking deeper google's material chart information found on website:

the material charts in beta. appearance , interactivity largely final, but way options declared not.

trendlines , tooltips fall under options section of creating charts since need options structure further define them. again, of date (march 2015) google materials charts not support these features. if want use things trendlines , tooltips need use non material charts (e.g. packages['corechart'] , not packages['scatter']).


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -