Is it possible to style just one segment of a Google Line Chart as a dashed line? Like this:
There is a certainty
role that can achieve that but with at least two segments, because "the segment between two data points is certain if and only if both data points are certain" (See https://developers.google.com/chart/interactive/docs/roles#what-roles-are-available)
There is a way but is more than hack that an official solution, here is an example:
data.addColumn({type:'boolean',role:'certainty'}); // certainty col.
data.addRows([
[1, 41.8, true],
[2, 32.4, true],//duplicate this
[2, 32.4, false],
[3, 25.7, true],
[4, 10.5, true],
[5, 10.4, true],
[6, 7.7, true],
[7, 9.6, true],
[8, 10.6, true],
[9, 14.8, true],
[10, 11.6, true],
[11, 4.7, true],
[12, 5.2, true],
[13, 3.6, true],
[14, 3.4, true]
]);
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