I'm trying to get a stepped line chart with Google Chart API. I've searched the docs and haven't found anything.
Here's an example I saw with Flot:
http://www.flotcharts.org/flot/examples/threshold/index.html
More info:
I'm trying to plot account balances over time. So, if there's a balance of $1,000 on Jan 1 and a balance of $2,000 on Feb 1, the google line chart displays a sloped line between Jan and Feb, which does not reflect the actual account balance accurately. I'd rather not plot more values (i.e. by adding the balance of $1,000 on Jan 31) but may have to if that's the only way...
A stepped line graph (also called step chart) is a chart similar to a line graph, but with the line forming a series of steps between data points. A stepped line chart can be useful when you want to show the changes that occur at irregular intervals.
A flowchart is a diagram that shows each step or progression of a process in sequential order. Lines indicate directional flow and there's a standard set of symbols that help describe the step-by-step procedures, inputs, and decisions in the process.
In your example, if you plot the $1,000 on Feb 1 (ie the before and after values on the same date) you get a nice step. It's a work-around and there must be better solutions, but it's easy to implement and does give you what you're after visually.
Look into the following article:
https://developers.google.com/chart/interactive/docs/gallery/steppedareachart?hl=ru
and playground:
https://code.google.com/apis/ajax/playground/?type=visualization#stepped_area_chart
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