Hi Syam Very good work. Is it possible in line chart, on the bottom to add

Hi Syam
Very good work.
Is it possible in line chart, on the bottom to add specified numbers or other kind of values?
For example can this

XAxis xAxis = new XAxis(DataType.NUMBER);

be replaced in order not to show incremented values (1,2,3,4) but values defined?

Thank you

Hi,
Can you please set an appropriate formatter function on the axis label? The ticks for which no label should be displayed can return empty strings.
[API]
(https://storedobject.com/api/com/storedobject/chart/Axis.Label.html#setFormatterFunction(java.lang.String))

Hi Syam.
Can you please improve code in the ‘code samples’ page on the example ‘A Simple Line Chart’ and ‘Multiple lines’?
Please add in these the formater function and show some data values in XAxis.

Thank you in advance

I have added a simple example. You can check the example: “LineChart with Custom X-labels”.

Thank you Syam. Perhaps I didn’t make myself clear. I would like something like the following that exists in barchart so I can define the values of x axis with values.

CategoryData labels = new CategoryData("Banana", "Apple", "Orange", "Grapes");

Moreover can this be also replace by an array of values?

Thank you

Yes, you can set CategoryData as data for the X-axis of the line chart.
Also, you can add anything to CategoryData.

        CategoryData cd = new CategoryData();
        cd.add("Anything");
        cd.add("Anything Else");