setShowXValues for string x values

Posted by user1221941 
setShowXValues for string x values
April 15, 2012 08:15AM
Hi All,
I use:
var myData = new Array([4,0],[5,0],[6,0],[7,0],[8,0],[9,2],[10,0],[11,0]);
var sessionsChart = new JSChart('graph', 'line');
sessionsChart.setDataArray(myData);
sessionsChart.setShowXValues(false);
sessionsChart.draw();

and everything work fine, no x values are shown. However if I use:

var myData = new Array(['4',0],['5',0],['6',0],['7',0],['8',0],['9',2],['10',0],['11',0]);
var sessionsChart = new JSChart('graph', 'line');
sessionsChart.setDataArray(myData);
sessionsChart.setShowXValues(false);
sessionsChart.draw();

all the X values are shown. Does setShowXValues(false) work only for numbers? I need it for strings since my values are 11-04, 12-04, 13-04... format and I don't want to show all of them.

Thanks in advance
Re: setShowXValues for string x values
September 24, 2012 11:27AM
I have the same problem . There is a work around ?
Re: setShowXValues for string x values
November 05, 2012 01:02PM
The values are the numbers which you are passing to the chart in order to draw the line and not strings. What you have on x axis are not values, those are labels and you will need to use clearLabelX method in order to not display them.
Sorry, you do not have permission to post/reply in this forum.