Const line label outside of the grid?


Author
Message
Syrhey Karol'
Syrhey Karol'
Forum Member (27 reputation)Forum Member (27 reputation)Forum Member (27 reputation)Forum Member (27 reputation)Forum Member (27 reputation)Forum Member (27 reputation)Forum Member (27 reputation)Forum Member (27 reputation)Forum Member (27 reputation)
Group: Forum Members
Posts: 21, Visits: 74
Hi!

Is it possible to draw a const line label outside of the grid? Like in the red square of the attached image.
Or I should use custom painting for that goal.

Best Regards,
Zonder.

Attachments
Const Line label.png (85 views, 14.00 KB)
Reply
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 Zonder,

Another approach is to use custom value labels:

   NChart chart = nChartControl1.Charts[0];

   NBarSeries bar = new NBarSeries();
   bar.Values.Add(10);
   bar.Values.Add(20);
   chart.Series.Add(bar);

   NStandardScaleConfigurator scale = chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator as NStandardScaleConfigurator;

   if (scale != null)
   {
    scale.CreateNewLevelForCustomLabels = false;
    scale.CustomLabelFitModes = new LabelFitMode[] { LabelFitMode.RemoveOverlap };

    NCustomValueLabel customLabel = new NCustomValueLabel();
    customLabel.Text = "Some Label";
    customLabel.Value = 15;
    customLabel.Style.ZOrder = 1;
    scale.CustomLabels.Add(customLabel);
   }
In this case auto labels that are overlapping with the custom label will be removed from the scale.



Best Regards,
Nevron Support Team


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