Can we change LineCharts x-axis to no be DateTime
Application Type
Reactive
Service Studio Version
11.10.10 (Build 38781)

Currently I am creating a line chart in a Reactive Web App that takes in datapoints of:

However when I display the graph the Label (Text) of "Sprint X" doesn't carry through but it shows a DateTime (below), when debugging I can confirm that the data is being assigned into the Datapoint correctly.


I have tried some different methods such as data conversion, filling from different sources but I can't seem to get a non DateTime Label. Is it possible to change the axis data type ? (In my case to Text)


Additional Details:

The Label is the only data not progressing, the Value and DataSeriesName are correct

Data for the Chart is calculated in an aggregate and appended using ListAppend action to a "Datapoint List" variable.


mvp_badge
MVP
Solution

Hi Matthew,

It seems that somewhere in your code, you assign a Date to the DataPoint's Value. To determine whether the Value is a Date or Date Time, the Platform tries to convert whatever is in the Value to a Date or Date Time, and if it succeeds, it configures a date/time axis. Otherwise it will be a discrete axis.

That makes sense, as I was passing decimal values, which DateTime is stored as I believe, thanks for the response

Solution

I found the definite issue for this:
In my screenshot above the Label value is: "Sprint 1" this is being recognised as a Date/DateTime due to the space.
When the data was changed to have labels with no space "Sprint1", Text is detected and everything is works perfectly.

Rather an unusual test case.

mvp_badge
MVP
Solution

Hi Matthew,

It seems that somewhere in your code, you assign a Date to the DataPoint's Value. To determine whether the Value is a Date or Date Time, the Platform tries to convert whatever is in the Value to a Date or Date Time, and if it succeeds, it configures a date/time axis. Otherwise it will be a discrete axis.

That makes sense, as I was passing decimal values, which DateTime is stored as I believe, thanks for the response

mvp_badge
MVP

Interesting, I would think that decimal values wouldn't be converted, but on the other hand, could be that they are. Thanks for the response.

Solution

I found the definite issue for this:
In my screenshot above the Label value is: "Sprint 1" this is being recognised as a Date/DateTime due to the space.
When the data was changed to have labels with no space "Sprint1", Text is detected and everything is works perfectly.

Rather an unusual test case.

mvp_badge
MVP

This is quite odd! I'd suggest you also report this to OutSystems via the Support page, as it is very unexpected and imho a bug!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.