For the below array i get a smooth curve.
data.addColumn('string', 'x');
data.addColumn('number', 'Cats');
data.addColumn('number', 'Blanket 1');
data.addColumn('number', 'Blanket 2');
data.addRow(["A", 1, 1, 0.5]);
data.addRow(["B", 2, 0.5, 1]);
data.addRow(["C", 4, 1, 0.5]);
data.addRow(["D", 8, 7 , 1]);
data.addRow(["E", 7, 1, 0.5]);
data.addRow(["F", 7, 0.5, 1]);
data.addRow(["G", 8, 1, 0.5]);
data.addRow(["H", 4, 0.5, 1]);
data.addRow(["I", 2, 1, 0.5]);
data.addRow(["J", 3.5, 0.5, 1]);
data.addRow(["K", 3, 1, 0.5]);
data.addRow(["L", 3.5, 0.5, 1]);
data.addRow(["M", 1, 1, 0.5]);
data.addRow(["N", 1, 0.5, 1]);
Now assume that I don't have the Blanket1 value for row D, how do I represent it so that there is coninuity in the graph?
If I make it like data.addRow(["D", 8, , 1]);
the graph becomes discontinuous at the D for Blankets.
I want google to make a guess at that value and keep the curve smooth. Even if the guess is not smart that is fine but the curve should be continuous and smooth.
Use noData() method to enable "No data" label: chart. noData().
How to display both Percentage and Values in Google Pie Chart ? You can't display both on the slice labels, but if you set the pieSliceText option to 'label' and the legend. position option to 'labeled' , you will see the value on the slice and the percent on the legend label.
arrayToDataTable()This helper function creates and populates a DataTable using a single call. Advantages: Very simple and readable code executed in the browser. You can either explicitly specify the data type of each column, or let Google Charts infer the type from the data passed in.
On your computer, open a spreadsheet in Google Sheets. On the chart, right click the bar or point. Click Format Data Point. Make your changes.
What you are looking for is the option:
interpolateNulls = true;
And then you just put a 'null' into the value array at the point where data is missing.
Check the API reference: http://code.google.com/apis/chart/interactive/docs/gallery/linechart.html#Configuration_Options
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With