Reputation: 1
I have a react chart using Kendo React Charts and I'm simply trying to change the labels on the x-axis, but I cannot find any references or example code to do this. Any help is much appreciated.
Here is the code I am working with.... I want to use the xaxisLabels to replace the numeric values shown on the x-axis of the chart.
const \[firstSeries, secondSeries\] = \[
\[100, 123, 234, 343, 300, 120\], \[100, 67, 231, 196, 300, 120\],\];
const categories = \["Discharge in Rod", "Corona on End Fitting", "Lightning Flashover", "Contamination", "Wetting Discharge Activity", "Ultraviolet Light"\];
const xaxisLabels = \["Low", "Medium", "Medium High", "High"\];
.......my current chart
<Chart>
<ChartArea border={{ color: "black" }} />
<ChartTitle text="" />
<ChartCategoryAxis>
<ChartCategoryAxisItem categories={categories}>
<ChartCategoryAxisTitle text="" />
</ChartCategoryAxisItem>
</ChartCategoryAxis>
<ChartSeries>
<ChartSeriesItem type="bar" gap={2} spacing={0.25} data={firstSeries} />
<ChartSeriesItem type="bar" data={secondSeries} />
</ChartSeries>
</Chart>
Upvotes: 0
Views: 38