Profile Picture

Wrapping axis title

Posted By Alex W 11 Years Ago
Author
Message
Nevron Support
Posted 2 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 Timothy,

Thank you for sending the code. The problem is that the code relies on custom decorations that are added to the scale initially, but not after you alter the scale (which will rebuild the scale decorations). To solve the problem you need to add custom decorations each time you modify the scale - for example:

  private void OnChartControlDoubleClick(object sender, EventArgs e)
   {
    var chart = nChartControl1.Charts[0];
    var axis = chart.Axis(StandardAxis.PrimaryY);
    var majorGridStyle = axis.ScaleConfigurator.MajorGridStyle;

    // toggle major grid line visibility
    majorGridStyle.SetShowAtWall(ChartWallType.Back, !majorGridStyle.GetShowAtWall(ChartWallType.Back));

    CreateVerticalAxisLabel(axis, "Title 1");

    nChartControl1.Refresh();
   }

Will fix the problem. You can also check out the following topic:
https://helpdotnetvision.nevron.com/UsersGuide_Axes_Scale_ProgrammingTheScale_Getting_Started.html

which talks about how to add custom-scale decorations.

We hope this helps - let us know if you have any questions or meet any problems.


Best Regards,
Nevron Support Team



Timothy Wong
Posted 2 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: Last Year
Posts: 5, Visits: 49
Recreating the label with decorations solves the problem. Thank you!




Similar Topics


Reading This Topic