Wrapping axis title


Author
Message
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
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
Timothy Wong
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
Posts: 5, Visits: 49
Recreating the label with decorations solves the problem. Thank you!

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search