Marco,
Please take a look at this updated JSFiddle which shows how to update data from external JSON.
—
Vishwas R
Team CanvasJS
Marco,
Parsing JSON to the format accepted by CanvasJS and passing it to chart-options should work fine. However, date-time over axisY is not possible as of now. which you can work-around it as shown in this JSFiddle.
If you are still facing any issue, kindly create JSFiddle reproducing the issue and share it with us so that we can look into it and help you out.
—
Vishwas R
Team CanvasJS
It is possible in Range Bar Chart to have more than one bar for each y-axis value?
Incase of range-bar chart, x-axis is placed vertically and y-axis horizontally. Do you mean same x-value? If so, you can achieve it by passing same x-value for multiple datapoints as shown in this JSFiddle.
If this doesn’t help you fulfill your requirements, can you kindly share pictorial representation or an example of your requirements & brief us further so that we can understand it better and help you out?
—
Vishwas R
Team CanvasJS
Can you kindly brief us further about your requirement along with pictorial representation or an example so that we can understand it better and help you out?
—
Vishwas R
Team CanvasJS
Grids are shown at every interval on the axis & may not be shown at viewportMinimum & viewportMaximum after zooming as the viewport range may not be the integral multiples of the interval. To show the grids at viewportMinimum & viewportMaximum upon zooming / panning, you can add striplines on rangeChanged event as shown in this JSFiddle.
my requirement is mentioned in the below picturescreenshot
in this picture the green line that is not in the zoomed graph and the x-max and y-max values also
please provide a solution
The image shared by you is restricted and requires permission. Can you kindly make it public so that we can access it to understand the scenario?
—
Vishwas R
Team CanvasJS
You can use CanvasJS Column Chart with indexlabel, which auto-adjusts / pushes inside without clipping towards top of the chart.
—
Vishwas R
Team CanvasJS
You can use range-column chart to render column from negative to positive. It’s not possible to position x-axis to at zero-value. However you can workaround this as shown in this JSFiddle.
—
Vishwas R
Team CanvasJS
You can define the format of value shown in axis label by setting valueFormatString. To show labels as 10/06/2020, you should be setting valueFormatString to “DD/MM/YYYY’. Please refer documentation for more customization options available.
—
Vishwas R
Team CanvasJS
AJAX request is asynchronous – the operation occurs in parallel and the order of completion is not guaranteed. In your case, calling stockChart.render() soon after updating datapoints within AJAX request should work fine. Please take a look at this updated JSFiddle.
Considering this thread as duplicate of stripLines in stockCharts acting weird. Hence closing the same.
—
Vishwas R
Team CanvasJS
AJAX request is asynchronous – the operation occurs in parallel and the order of completion is not guaranteed. In your case, calling stockChart.render() soon after updating datapoints within AJAX request should work fine. Please take a look at this updated JSFiddle.
—
Vishwas R
Team CanvasJS
It seems to be working fine, please take a look at this StackBlitz code for simple demo on the same.
If you are still facing issue, can you kindly create sample project reproducing the issue you are facing and share it with us, so that we can look into the code / chart-options being used, understand the scenario better and help you resolve?
—
Vishwas R
Team CanvasJS
You can get the instance of the chart by passing onRef = {ref => chart = ref}
props to the Chart Component. Later you can call chart.render();
. Please refer documentation for more information about CanvasJS React Component & the props available.
If you are looking to explode just one slice, you can set exploded property of all the dataPoints to false except the currently clicked slice. Please take a look at this StackBlitz code for an example on the same.
—
Vishwas R
Team CanvasJS