Hi Priyanka, thanks for this example. I am trying to implement but I just get a blank screen when I try.
I am unable to create a jsfiddle because when I try to pull the data from a CSV file I just get a blank screen.
Is it possiblef for you to look at this bare-bones example to see how I can pull the chart title from the CSV? http://www.globalhungerindex.org/csv/csv.html
Please take a look at this jsfiddle.
I have considered the first 9 countries from the CSV data you have provided and plotted the graph which renders according to the index that you provide manually var index = 9;. You can save the valid CSV data for the remaining countries in a file and run the same code. It should work fine for you.
Hi Priyanka,
thanks for this, it’s great! But there’s just something strange happening with the X-axis. The four years are not being displayed correctly on the x-axis.
Hi, I have a working demo of a more complicated multi-series spline and have tried to create a JSFiddle but I can’t get it to work, but this works perfectly as a webpage. Would you be able to take a look and see if you can understand? I am wondering how to do the same task as before – for the chart title, pull the country name from column 1 of the CSV – every fourth row as per the CSV. I tried the method you provided previously for the other chart but I can’t get it to work on this one. If I can provide any additional information, please just let me know: https://jsfiddle.net/w90ze7us/36/
Please take a look at this updated jsfiddle.
Also, I suggest you to have the country name in every record of CSV source, which will be easier to compare and retrieve the required country’s records among many records.
__
Priyanka M S
Team CanvasJS
Hi, with this method, I still have to manually change the index so it’s just the same as manually typing the country name. It’s not really making anything more automated.
If you like to show y-value without decimal point in toolTip and indexLabel, you can use yValueFormatString. Please take a look at this updated JSFiddle.
At the same time, to format x-value displayed in toolTip and indexLabel, you can set xValueFormatString according to your requirements and to format axis-labels, you can use valueFormatString.