Once the chart is rendered, you can get dataSeries color using get method as shown in the code snippet below –
for(var i = 0; i < chart.data.length; i++) {
console.log(chart.data[i].get("color"))
}
Please take a look at this jsfiddle.
—
Vishwas R
Team CanvasJS
Thank you, but can I send you the link via private email? because I can not share as public in here.
One of team members will get in touch with you soon over email.
I also try this code https://canvasjs.com/jsp-charts/chart-from-csv-data/
But when I try the content of chart does not appear.
And this is the following error: Failed to load https://canvasjs.com/data/gallery/jsp/tuna-production.csv: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://localhost:8080’ is therefore not allowed access.
For security reasons, browsers restrict cross-origin requests. Please refer this stackOverflow post for more information.
—
Vishwas R
Team CanvasJS
Trial Version is for evaluation purposes for up to 30 days. To use charts without ‘Trial Version’ and ‘CanvasJS’ Credit Link you will need to have a Commercial Version of CanvasJS. Please contact sales@canvasjs.com for sales related queries.
—
Vishwas R
Team CanvasJS
Can you kindly share sample project along with sample database over Google-Drive or Onedrive, so that we can look at your code, understand it better and help you out?
This tutorial on Saving/Retrieving BLOB object in Spring MVC might help you handle the scenario you have described above.
—
Vishwas R
Team CanvasJS
valueFormatString formats the labels appearing on axisY. To format the y-values that appear in toolTip / indexLabel, you should use yValueFormatString. Setting yValueFormatSting to ‘#,##0.00’ should work fine in your case. Please refer documentation on yValueFormatString for more info and formatting options available for the same.
It would be helpful for us to understand your scenario better when we look at your working code live in jsfiddle. So I request you to create jsfiddle and share it with us, rather than pasting code, if you are still facing any issue.
—
Vishwas R
Team CanvasJS
Please refer tutorial on Creating Dynamic Charts for more info on how to update dataPoints dynamically. Also refer tutorial on updating chart options / data.
—
Vishwas R
Team CanvasJS
CanvasJS supports rendering any language in title, legend and other elements. You can pass the legend-text in the language you would prefer it to render and it should work fine. Please take a look at this jsfiddle which shows rendering title and legends in Japanese.
a way to retrieve legend labels from JSON file?
Please take a look at this jsfiddle.
—
Vishwas R
Team CanvasJS
Considering this post as duplicate and closing the thread. Please refer the original thread for updates.
—
Vishwas R
Team CanvasJS
Setting valueFormatSting to ‘#,##0.00’ seems to be working fine with the y-value that you have shared (114307653.79).
Can you kindly create jsfiddle reproducing the issue you are facing, so that we can look into your code, understand it better and help you out?
—
Vishwas R
Team CanvasJS
I don’t see any column with the name ‘file_data’ of the type LONGBLOB in the screenshot that you have shared! Please checkout this tutorial on Saving/Retrieving BLOB object in Spring MVC.
If there is any issue integrating CanvasJS in your Spring MVC project, please download the Sample project from our download page. If you have any other issues, kindly create sample project along with sample database and share it over Google-Drive or Onedrive so that we can look into your code, understand it better and help you out?
—
Vishwas R
Team CanvasJS
You can post your question in forum by clicking ‘Ask Question’ button available in the top of the page in every forum. Please refer the screenshot below.
—
Vishwas R
Team CanvasJS
You are trying to update visible property directly and not through chart-options. Updating chart options should work fine in this case. Can you kindly update your code to chart.options.data[i].visible = false;
instead of chart.data[i].visible = false;
and the same in ShowAll() aswell.
If this doesn’t solve your issue, kindly create jsfiddle reproducing the issue, so that we can look in to your code, understand it better and help you out.
—
Vishwas R
Team CanvasJS
Thanks for reporting. We will look into the issue and fix it in the future releases.
—
Vishwas R
Team CanvasJS
if I want to move the point inside the chart shoud i use draggable function ? is the drag of a point supported?
You can overlay custom DOM on top of chart, please refer Chart with Image Overlay for an example on the same.
Dragging and updating the dataPoint is possible in CanvasJS. Please refer ‘Interactivity Example’ in Features section of our homepage for the same. Also please take a look at an example in out gallery on Draggable Column Chart.
can I also keep more points like D, F, G at the same time?
Yes, you can have as many dataPoints and legends as you want.
—
Vishwas R
Team CanvasJS