Avatar of TUS11
TUS11 asked on

Google Charts help required, for Demand & Supply chart with extra vertical line

Google charts API help required.

Example link : Click here to see an Example of Chart

Actually, I want to create a demand & supply chart (with Google Charts API) this will be a simple Area chart with to area lines (one for demand & other for supply), but also I want to show a third line (not area only line) see the above link for example.

Any ideas how could I draw such Chart, I could only manage to draw without the Center line part.

This is the example of Chart
Web ComponentsJavaScript

Avatar of undefined
Last Comment

8/22/2022 - Mon
Rainer Jeschor

the type of chart in Google Charts would be a scatter chart, setting the lineWidth and pointSize properties accordingly (using https://code.google.com/apis/ajax/playground/?type=visualization#scatter_chart and adding ", lineWidth: 2, pointSize: 0," after the height property).
The issue is that as far as I know there is no chance to combine an area chart with a scatter chart with Google visualization.


Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

You can do that using a ComboChart. The trick is in creating the middle line - normally, you draw lines horizontally, using (x, y) coordinate pairs; to draw vertically, invert the pairs to (y, x), but you must keep them ordered by the x-value (otherwise the line will become messed up).
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy