@pieter
dataPoints is an array of objects but you seem to be pushing arrays of dataPoints values. You need to format your data according to the format required by canvasJS.
—- Bivek Singh, Team CanvasJS
@pieter,
You seem to be inserting dataPoints and dataPoints2 into thte same object which should be 2 different objects. Please take a look at this page.
Bivek Singh, Team CanvasJS
@Emeric
You can disable the rendering of chart each time a stripline is added by setting the fourth parameter to false in addTo method. It is taking long time to render since you’re rendering the chart each time a stripline is added as the fourth parameter is set to true by default. You will still need to render the chart once you are done with adding all the striplines.
$.each(data, function(key, value){ chart.axisX[0].addTo("stripLines", {value: value, lineDashType: "dot"}, 0, false); }); chart.render();
Please update the changes in your code and it should work fine. —- Bivek Singh, Team CanvasJS
You can click here and scroll to bottom of the page to create a new thread.
Hannah,
Legends are not shown as you have set showInLegend to false.
@BappaAditya,
Please take a look at this jsFiddle.
@azel,
You can customize toolTip without setting labels. You can use toolTipContent or contentFormatter for modifying the toolTip content as per your requirement. Let us know if this solves your problem.
@prathamesh,
We have replied you on another post that you created for same topic. Please refer the post from here.
You can set maximum and minimum for axisX to allocate some extra space at the beginning and ending of the chart plotArea. This will solve your problem of not being able to hover. Please take a look at this jsFiddle. However, if you want to expand the chart plotArea to 100% of the canvas, you can take a look at this work-around without editing the source file. If this doesn’t solve our problem, please let us know and we’ll assist you further for it.
@Akki1992,
This issue has been fixed in the latest version. Please download the latest build 1.9.9 from here.
@mhoward1,
You can add stripLine for drawing a vertical line along axisX as shown in the code snippet below –
function stripLineHandler(position){ if(!chart.options.axisX){ chart.options.axisX ={}; } if(!chart.options.axisX.stripLines){ chart.options.axisX.stripLines = []; } chart.options.axisX.stripLines[0] = { value : position, thickness: 2, //color:"red", showOnTop: true, label: (new Date(position).getDate()+"-"+new Date(position).getHours()+":"+new Date(position).getMinutes()+":"+new Date(position).getSeconds()), labelPlacement: "outside" } chart.render(); }
Please take a look at this JSFiddle for working example.
You can use addTo method to dynamically set stripline. For toggling the visibility of grid lines, you can set it’s thickness value. Please, take a look at this JSFiddle.
@rs
Thank you for reporting this. We are looking into the issue and will get back to you at the earliest.
@jerrygarciuh
After changing the value, you’ll need to re-render the chart to observe the changes. You can also use set method to change different properties of the chart. Please, take a look at this jsFiddle.
@rohithk,
Please download PHP samples from download page.