Home › forums › Using CanvasJS › guide line
Tagged: Trendline Chart
This topic contains 12 replies, has 4 voices, and was last updated by nisha 7 months ago.
Is there a way using CanvasJS to draw a guide line on any graph ? Something like a median, on a stackedBar type, for example.
As of now there is no separate element for doing that. But you can use Combination Charts to do the same. Just add a line chart and disable markers by setting markerSize to 0.
Many thanks. I was looking to that solution, but I said to ask, maybe there is a simpler solution.
Yep… this combination does not work for me.
For stackedBar and line… I get this message in the console:
You cannot combine “line” with bar chart
Yes, bar charts cannot be combined with other chart types. You can use stackedColumn if that works for you. Trendlines have been planned for version 1.3. If you can post some picture depicting what you are looking for, that would be helpful.
This is the graph I need:
http://s8.postimg.org/uluylkr7p/median.jpg (just an example).
I think it’s very useful for any graph, because you can clearly see where everything stands.
This is no rush for me, I can wait a future release. I really like your library, because is so simple and smooth to use. I’ve tried before a few, but were not so easy to use, or were buggy.
Am Glad that you liked CanvasJS. I was planning for something similar… It’ll be available in v1.3 – around a month.
How to make Trendline chart (Straight Line) in CanvasJS?
You can add another dataSeries of line type with just 2 dataPoints to show trend. Please take a look at this JSFiddle.
yValue += Math.round(Math.random() * 10 – 5);
What is 10 and 5 here. On what basis we take 10 and 5. Are they constant values? in any chart we are going to take 10 , 5 or it depends on X and Y value. Please explain this also.
Thank you for your prompt response and proper explanation.
I need Trend Line chart by this calculation. Please check link below
based on this link i want to create chart. Number will be random sometimes will get 4 nos sometime will get 5 no. based on date parameter in query.
how do I create Trend line chart by using above formula. Please help me. I wil take data from Database.
based on this link i want to create chart. Number will be random sometimes will get 4 no of rows for data sometime will get 5 nos of rows of data based on date parameter in query.
You must be logged in to reply to this topic.