Trying to Add a Top Axis
Posted: Mon Mar 29, 2021 5:30 pm
Hi
I create a simple line plot as shown below. Everything is great with the X and Y axis displayed and labelled correctly as expected.
However Id also like to display a top axis comprising integer values that match the number of items in the bottom X-axis.
So the top axis would be {1,2,3,4,5}. Is there an easy way to do this? Thanks.
Line plot = new Line();
plot.Title = "My Plot";
List<float> xAxis = new List<float>(5) { 9.3, 10.3, 11.3, 12.3, 13.3 };
List<float> yAxis = new List<float>(5) { 44, 19, 67, 87, 9 };
plot.Add(xAxis.ToArray(), yAxis.ToArray());
myChart.Series.Add(plot);
I create a simple line plot as shown below. Everything is great with the X and Y axis displayed and labelled correctly as expected.
However Id also like to display a top axis comprising integer values that match the number of items in the bottom X-axis.
So the top axis would be {1,2,3,4,5}. Is there an easy way to do this? Thanks.
Line plot = new Line();
plot.Title = "My Plot";
List<float> xAxis = new List<float>(5) { 9.3, 10.3, 11.3, 12.3, 13.3 };
List<float> yAxis = new List<float>(5) { 44, 19, 67, 87, 9 };
plot.Add(xAxis.ToArray(), yAxis.ToArray());
myChart.Series.Add(plot);