Skip to main content
14-Alexandrite
January 13, 2026
Solved

Limiting number of x labels on chart when the x axis is string type

  • January 13, 2026
  • 1 reply
  • 73 views

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?

Best answer by slangley

Hi @JO_9930585 

 

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

1 reply

slangleyCommunity ManagerAnswer
Community Manager
January 15, 2026

Hi @JO_9930585 

 

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

14-Alexandrite
January 16, 2026

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!