Profile Picture

How to make more room for axis title text at multiple Y-axis charts

Posted By Hans Henrik Friis Pedersen... 9 Years Ago

How to make more room for axis title text at multiple Y-axis charts

Author
Message
Hans Henrik Friis Pedersen...
Question Posted 9 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: 8 Years Ago
Posts: 28, Visits: 136

Hi,

How do I make more space for the axis title text at the multiple Y-axis chart shown below? I would like to make more space between the Y-axis so that the title text is spaced longer away from the next Y-axis...??https://www.nevron.com/forum/uploads/images/2e58f8da-10eb-44f7-8bb5-14fe.png



Nevron Support
Posted 9 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: Yesterday @ 1:54 AM
Posts: 3,054, Visits: 4,009
Hi Hans,

You can achieve this by using the AfterSpace property of the axis anchor - for example:

   NChart chart = nChartControl1.Charts[0];

   NBarSeries bar = new NBarSeries();

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

   chart.Series.Add(bar);
   bar.DisplayOnAxis(StandardAxis.SecondaryY, true);

   NDockAxisAnchor dockAnchor = (chart.Axis(StandardAxis.PrimaryY).Anchor as NDockAxisAnchor);
   dockAnchor.AfterSpace = new NLength(15);
   chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator.Title.Text = "Some Title";

   chart.Axis(StandardAxis.SecondaryY).Anchor = new NDockAxisAnchor(AxisDockZone.FrontLeft);
   chart.Axis(StandardAxis.SecondaryY).Visible = true;

Increases the distance between the axes to 15 points.



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic