alex
alex

Reputation: 141

Google Chart API - Stepped Line Chart

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...

Upvotes: 7

Views: 3333

Answers (2)

Piddles
Piddles

Reputation: 31

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.

Upvotes: 2

Related Questions