Changing the zoom level of NLabel control during export


Author
Message
Irina
Irina
Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)
Group: Forum Members
Posts: 23, Visits: 306
Hi,
When exporting a chart control to an image, I can specify the desired size of the image. If this size is less than the size of the control, the chart will be zoomed out, but the NLabel control will have the same size. Is it possible to change the zoom level of the NLabel control based on the specified dimensions during export?
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 Irina,
Yes you can use relative units to specify the size of the header - for example:

   nChartControl1.Panels.Clear();

   NLabel label = new NLabel("Some Label");
   label.BoundsMode = BoundsMode.Fit;
   label.TextStyle.FontStyle.EmSize = new NLength(5, NRelativeUnit.RootPercentage);
   label.DockMode = PanelDockMode.Top;
   nChartControl1.Panels.Add(label);

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

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

Alternatively you can simply set the font size depending on the export image size.


Best Regards,
Nevron Support Team


Irina
Irina
Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)
Group: Forum Members
Posts: 23, Visits: 306
Hi,
Your approach works. 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