Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can't replace the text if you want to use the annotation functionality (as the text is what is generated by the annotations). You could use an overlapping data series to show only certain points. Here's an example that shows an overlapping series (I removed the annotations for simplicity, but you can still use them if you want to):</p> <pre><code>function drawVisualization() { var data = new google.visualization.DataTable(); data.addColumn('number', 'Overs'); data.addColumn('number', 'Run-rate'); data.addColumn('boolean', 'Wicket falls'); data.addRows([ [1, 6, false], [2, 6, false], [10, 2, true], [20, 3.2, false], [21, 3, true], [30, 4, true], [40, 5, false], [50, 6, false] ]); // create a DataView that duplicates points on the "Run Rate" series where "Wicket falls" is true var view = new google.visualization.DataView(data); view.setColumns([0, 1, { type: 'number', label: data.getColumnLabel(2), calc: function (dt, row) { // return the value in column 1 when column 2 is true return (dt.getValue(row, 2)) ? dt.getValue(row, 1) : null; } }]); var options = { title: 'Run Rate', pointSize:0, hAxis: { gridlines: { color: 'transparent' } }, series: { 0: { // put any options pertaining to series 0 ("Run-rate") here }, 1: { // put any options pertaining to series 1 ("Wicket Falls") here pointSize: 6, lineWidth: 0 } } }; new google.visualization.LineChart(document.getElementById('chart_div')). // use the view instead of the DataTable to draw the chart draw(view, options); } google.load('visualization', '1', {packages:['corechart'], callback: drawVisualization}); </code></pre> <p>See working example here: <a href="http://jsfiddle.net/asgallant/saTWj/" rel="nofollow">http://jsfiddle.net/asgallant/saTWj/</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload