Home Forums Chart Support X Axis Data Consists of year and y consists of runs made by player

X Axis Data Consists of year and y consists of runs made by player

Viewing 5 posts - 16 through 20 (of 20 total)
  • #10653

    Is it possible or not? that line draw on X-axis for value 0.

    #10655

    Cameron,

    Basically the value of log(0) is not defined and tends to -Infinity. So, if you put it in your logarithmic chart it will look like DataPoint at - Infity. Here to ignore such case I have mapped it’s value to null. But sill if you want to customise further you can edit convertToLog function as per your requirement. You can edit it like below

     function convertToLog(data){
        var dataPoints;
        for(var j= 0; j<data.length;j++){
            dataPoints = data[j].dataPoints;
            for(var i = 0; i< dataPoints.length; i++){
    			if(dataPoints[i].y > 0)
              		dataPoints[i].y = Math.log10(dataPoints[i].y);
    			else if(dataPoints[i].y === 0)
    				dataPoints[i].y = null; //update dataPoints[i].y as per your requirement (-Infinity)
    			else
    				dataPoints[i].y = null;
            }
         }
     }
    #10691

    Please check labels for X-Axis if width of window is maximum then it display two times year.
    Error when map size increases for X-Axis labels.

    • This reply was modified 7 years, 9 months ago by Cameron.
    #11017

    Cameron,

    Setting valueFormatString to “####” will round-off all the intermediate values. So, here 2006.5 will appear as 2007 and so on.
    To avoid this issue you can set interval to 1.

    #11972

    [Update]: We have just released v1.9.0 with Logarithmic Axis. Please checkout gallery page for Logarithmic Scale.

Viewing 5 posts - 16 through 20 (of 20 total)

You must be logged in to reply to this topic.