For Thingworx 10.0.0 in the line chart widget...
I am trying to limit the number of x axis labels. I see this is possible if the x axis type is numeric or date type. However, with string type, the property numberOfXAxisLabels is not visible. Is there a way to limit this somewhere when the x axis is a string type?
Solved! Go to Solution.
In ThingWorx 10.0, limiting the number of x-axis labels in a line chart widget is straightforward for numeric or date types, as the property numberOfXAxisLabels is available. But as you found, when using a string type for the x-axis, this property is not visible, and there is no direct option to limit the number of labels.
To manage the display of x-axis labels when using string types, consider the following approaches:
Data Preprocessing: Before binding your data to the chart, preprocess the data to limit the number of string labels. You can create a new data set that only includes the desired labels.
Custom Widget: If you have development capabilities, you could create a custom widget that allows for more control over the x-axis label rendering, including limiting the number of labels displayed.
Styling Adjustments: Adjust the styling or layout of the chart to accommodate more labels without overcrowding, such as rotating labels or using a smaller font size.
If you need assistance to develop a solution, such as in the case of a custom widget, please contact your Sales rep or reach out to the Sales team.
Regards.
--Sharon
In ThingWorx 10.0, limiting the number of x-axis labels in a line chart widget is straightforward for numeric or date types, as the property numberOfXAxisLabels is available. But as you found, when using a string type for the x-axis, this property is not visible, and there is no direct option to limit the number of labels.
To manage the display of x-axis labels when using string types, consider the following approaches:
Data Preprocessing: Before binding your data to the chart, preprocess the data to limit the number of string labels. You can create a new data set that only includes the desired labels.
Custom Widget: If you have development capabilities, you could create a custom widget that allows for more control over the x-axis label rendering, including limiting the number of labels displayed.
Styling Adjustments: Adjust the styling or layout of the chart to accommodate more labels without overcrowding, such as rotating labels or using a smaller font size.
If you need assistance to develop a solution, such as in the case of a custom widget, please contact your Sales rep or reach out to the Sales team.
Regards.
--Sharon
Thanks for the reply. This is what my initial research found as well. Option one wont work in our case and option 2 is undesirable for a few reasons. Option 3 might be the only option for now, although it is not going to look great. Thanks for confirming this!
