dygraph: how to have string values in x-axis

1k Views Asked by At

I have requirements like plotting a graph for 'salesman wise sales', 'department-wise income ' etc... When I try giving string values in x-axis i am getting errors like below.

Couldn't parse Ahmed as a date

please help.

1

There are 1 best solutions below

0
On BEST ANSWER

The values other than date or float are prohibited for x-values. See Data Format. However you may put your string values in an array and use indexes instead of actual string values.

See xValueParser, valueFormatter and axisLabelFormatter as well.