Adding a horizontal line in canvasJS - javascript

I am making a comfort level chart with multiple area charts. I want to draw a horizontal line, making it a level line. I am getting the area charts data. but i cannot get line data. I have to create it by own.
Please help.
Thanx in advance.

You can add Custom Horizontal Lines by using StripLine with value

Related

how to display all percentages on Google PieChart

I'm facing two problems.
How can I make sure that the whole legend can be seen under the graph? Indeed when the legend is too big three points are added.
My other problem concerns pie charts. How to make all the percentages appear on the graph, by default it puts them only when the place is sufficient on the graph?
Bar Chart problem
Pie Chart problem
Thanks you
Bar Chart Problem : Its the default behaviour. The 3-dots is called ellipses. It is used to truncate the strings to fit the in to the containing box/div. For more info, refer this. This workaround would help you if you wish the axes labels are need to be shown full. In case legend values, please refer this.
Please refrain rom using such long names for the axes as it affects the UX.
Pie Chart Problem : Its the default behaviour of Google Charts to show the values only if the values are sufficient to fit in the place. As a workaround, you can display all the values, in the chart using the option {legend : "labelled"}. Thanks to this Google Forum.
Example JS Fiddle

Draw vertical lines in chart

Is there any way to draw vertical lines in chart. (i.e.)
Under each dot there is a vertical line which is projected to x axis.
Could you advise how to customize it with Google Chart , of course if it is possible?
Are there any other libraries with such kind of line chart ?
p.s. In project I use Angular 1.5. Also I took a look on nvd3 but didn't find what I want
see config options...
use option for vAxis.gridlines to customize vertical lines...

ChartJS Data Overflowing Chart area

I have a chart created with ChartJS that displays datasets ( (x,y) pairs) in a line chart. Based on user requests, I am adding the ability for the user to change the X-max and Y-max values. All well and good until the datasets overflow the Chart area.
This is off the right side of the chart, in the blank space under the legend. As you can see, the lines stop following the points and go crazy until they are clipped by the canvas area.
I would like to clip or mask the visible data using the Chart area, rather than the Canvas area. Is there a setting in ChartJS to do this?
Edit: clarified title
I've found a partial solution. By adding lineTension: 0 to the Chart.dataset object, I was able to get the following:
Changing the line tension to 0 has eliminated the wavy lines outside of the chart area, but I'm still looking for a solution to the data overflow.

D3.js Multi Line Charts with zoom on y-axis and brush(as slider) on x-axis

I'm using D3 to create a realtime multi line charts with zoom and brush function. Basically I have two charts with their own zoom function for zooming in y-axis, and one brush function (work as slider) to control both x-axis.
The brush is working fine, however the zoom is not. When I zoom the 1st chart, both of the line will change accordingly (which I only want to zoom the 1st line) and when I zoom the 2nd chart, only the y-axis is zooming.
In another word, both of the lines are somehow linked with the y-axis in the 1st chart.
Please find the simplified code example here:http://jsfiddle.net/rzhu1140/x8gL6yc7/5/
I really don't know what part of the code is wrong, please let me know anything you guys can think of. Thanks a lot. The code for data assign and drawing is below.
zoom.y(y);
g2_zoom.y(g2_y);
svg.select("path.line").attr("d", line);
svg.select("path.line").data([seriesData[0]]);
g2_svg.select("path.line3").data([seriesData[2]]);
g2_svg.select("path.line3").attr("d", line3);
svg.select("g.y.axis").call(yAxis);
g2_svg.select("g.y.axis3").call(yAxis3);

How to create scrollable charts in DHTMLX charts

Is there any way to create scrollable DHTMLX Chart(Bar or Line chart).
As I understood from the code, the chart is drawing in three canvases.
one for horizontal lines, one for vertical lines and another for the actual chart. So, I am not able to make the chart scrollable.
I can put the total chart into a DIV and then I can use overflow:scroll.
But with this the y-axis labels will be hidden when I scroll to right side.
Is there any way to draw scrollable charts with DHTMLX chart. scrollable means like DHTMLX Gantt.
Could you please suggest me.
Thanks in advance.
Unfortunatelly there is no such functionality in dhtmlxChart. You can only scroll the oughter container.
Dhtmlx Chart has an option to add what they call 'series' (Sample: http://dhtmlx.com/docs/products/dhtmlxChart/samples/08_dynamic/01_add.html, what you could try to do is create an event that would control the vertical/horizontal scroll to dynamically add those 'series' creating a fake scroll effect, but i think that's too much work for too little gain.

Categories