Michela,
You can achieve this either by position transparent stripLines with label in-between columns as shown in this jsfiddle or by adding a scatter dataSeries to the chart as shown in this jsfiddle.
— Vishwas R Team CanvasJS
Pragyan,
width and height properties of the chart should be numeric. In the JSFiddle that you have shared, the values passed seems to be incorrect. Passing numeric values seems to be working fine in this case. Please take a look at this updated jsfiddle for working code.
By default Chart takes the size of its container (if set). So you can just set the width and height of the container in which you are going to place the chart as shown below: <div id="chartContainer" style="height: 300px; width: 500px;">
<div id="chartContainer" style="height: 300px; width: 500px;">
Else you can also set the same using “width” and “height” property in chart options.
var chart = new CanvasJS.Chart(“chartContainer”, { width:600,//in pixels height:800,//in pixels title: { text: ” Chart Title “, } ... ... }
If this doesn’t solve your issue, kindly create jsfiddle reproducing the issue you are facing so that we can look into your code and help you better?
@yueming,
You can use rangeChanged event of chart1 to programmatically zoom axis of chart2. Please check this updated jsfiddle.
You can also refer tutorial on Sync Zooming and Panning across Multiple Charts.
@ali,
x-Value can be numeric or a dateTime value. We observe that you are passing x-value as string, passing numeric or dateTime values will work fine.
Cristian,
1) By setting dataPointWidth based on axis width and number of dataPoints in column chart, histogram chart can be rendered. Please check this JSFiddle.
2) You can remove left/right padding between column and axis by setting minimum/maximum.
@bappaaditya,
We observe that x-values are not valid JavaScript date-time objects in your code and the jsfiddle you have shared is not working even in Google Chrome(v56.0.2924) or IE (v11.0.10240).
Chrome: IE:
Please refer this link for valid JavaScript date-time formats. Changing it to valid format will work fine across all browsers. Also refer date-time axis for more info.
Can you kindly create a jsfiddle that reproduces the issue, so that we can look into it and help you out.
Lawrence,
Sorry this feature is not available as of now.
Daniel Silva,
We have just released v1.9.8 with this bug fix. Please refer to the release blog for more information.
Dinesh,
@todor,
@chan,
@ashish-potdar,
dataPoints should be an array, but we observe that you are passing string instead of array. Please check this updated jsfiddle.