Profile Picture

How do I display text labels below a chart that are not tied to x axis values

Posted By Devin Ellis 6 Years Ago

How do I display text labels below a chart that are not tied to x axis...

Author
Message
Devin Ellis
Problem Posted 6 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: Forum Members
Last Active: Last Month
Posts: 9, Visits: 81
I have been trying to figure out how to add general text labels to a graph.
I have seen some references on adding a label tied to a value on a axis, but
what I need is a general label below the x axis that is not tied to a value like 
the link below, How do I do that?

Chart Lables

Nevron Support
Posted 6 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
Hi Devin,
The following sample shows how to add a scale title and header and footer labels:
nChartControl1.Panels.Clear();

NLabel header = new NLabel("Some Header Text");
header.DockMode = PanelDockMode.Top;
nChartControl1.Panels.Add(header);

NLabel footer = new NLabel("Some Footer Text");
footer.DockMode = PanelDockMode.Bottom;
nChartControl1.Panels.Add(footer);

NCartesianChart chart = new NCartesianChart();
chart.DockMode = PanelDockMode.Fill;
nChartControl1.Panels.Add(chart);

chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator.Title.Text = "Y Axis Title";
chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator.Title.Text = "X Axis Title";

NBarSeries bar = new NBarSeries();

bar.Values.Add(10);
bar.Values.Add(20);
bar.Values.Add(30);

chart.Series.Add(bar);
You can also take a look at the Panels \ Labels examples that show how to apply XML formatting to labels.
Let us know if you meet any problems or have any questions.

Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic