This behavior is by design. By default, dynamicUpdate property is set to true because of which the StockChart is updated dynamically while updating range using Slider. You can override this behavior by setting the dynamicUpdate property to false.
—
Shashi Ranjan
Team CanvasJS
Please take a look at this article for more information on using local and global variables.
—
Shashi Ranjan
Team CanvasJS
It seems like you are overriding the variable of the first chart with the second chart because of which when you try to update the dataPoints of the first chart, the changes are getting reflected in second chart instead of first. Therefore while using multiple charts on a page, we suggest using a different variable for each chart so that the individual chart-options can act independently. Please take a look at this updated JSFiddle for the same.
—
Shashi Ranjan
Team CanvasJS
When x-values are not provided in the dataPoints, internally it takes x-value as 0, 1, 2, … and increases based on the number of dataPoints. These x-values are used internally for calculating axis range, positioning dataPoints, etc.
Can you kindly brief us more about your exact requirement so that we can help you out with an appropriate approach?
—
Shashi Ranjan
Team CanvasJS
You can bind mouse events to the chart-container(div) and get mouse coordinates in pixels, which you can convert to corresponding value along axis using convertPixelToValue as shown in this documentation page.
If this doesn’t fulfill your requirements, kindly create a JSFiddle with your use-case and share it with us so that we can look into the chart options being used, understand the scenario better and help you resolve.
—
Shashi Ranjan
Team CanvasJS
The colorSet seems to be working fine irrespective of 3-digit or 6-digit hex values.
Also in JSFiddle shared by you, the first two colors in the colorSet are almost similar because of which color of both the line series look almost similar. Changing the hex values in colorSet(try colors with a significant difference) should work fine in your case.
—
Shashi Ranjan
Team CanvasJS
Please take a look at this documentation page for step to step tutorial on integrating CanvasJS StockCharts with your React applications.
If you are still facing the issue, kindly create a sample project reproducing the issue you are facing and share it with us over Google-Drive or Onedrive along with the sample data so that we run the code locally, understand the scenario better and help you out?
—
Shashi Ranjan
Team CanvasJS
You can achieve the above requirement by setting the toolTipContent property as shown in this JSFiddle.
—
Shashi Ranjan
Team CanvasJS
It looks like the sample page & the JSON seems to be not working.
Can you kindly create a sample project reproducing the issue and share it with us over Google-Drive or Onedrive along with the sample data so that we can run the code locally, understand the scenario better and help you out?
Considering this thread as a duplicate of Problem with getJSON on my server and hence closing the same.
—
Shashi Ranjan
Team CanvasJS
It looks like the sample page & the JSON seems to be not working.
Can you kindly create a sample project reproducing the issue and share it with us over Google-Drive or Onedrive along with the sample data so that we can run the code locally, understand the scenario better and help you out?
—
Shashi Ranjan
Team CanvasJS
Can you kindly create a working sample project reproducing the issue you are facing and share it with us over Google-Drive or Onedrive with the sample database and PHP files so that we can run the code locally, understand the scenario better and help you out?
—
Shashi Ranjan
Team CanvasJS