You create an ordinal scale by creating an instance of the NOrdinalScale class. The following code shows how to create an ordinal scale and assign labels for the first four categories:
| C# |
Copy Code
|
|---|---|
NOrdinalScale ordinalScale = new NOrdinalScale(); NList<string> labels = new NList<string>(); for (int j = 0; j < dataItemsCount; j++) { labels.Add("Category " + j.ToString()); } ordinalScale.Labels.TextProvider = new NOrdinalScaleLabelTextProvider(new string[] { "Apples", "Oranges", "Bananas", "Pears"}); m_Chart.Axes[ENCartesianAxis.PrimaryX].Scale = ordinalScale; |
|
