Author
|
Message
|
Filip Mergental
|
|
Group: Forum Members
Last Active: 11 Years Ago
Posts: 16,
Visits: 1
|
Hello,
I would like to create two charts, both occupied the whole area of its panel (DockStyle.Fill) and then I want to use the scrollbar to switch between them. Is it possible?
Best regards,Daniela
|
|
|
Nevron Support
|
|
Group: Forum Members
Last Active: 2 days ago @ 1:54 AM
Posts: 3,054,
Visits: 4,009
|
Hi Daniela, Can you please elaborate - what do you mean by switch between them?
Best Regards, Nevron Support Team
|
|
|
Filip Mergental
|
|
Group: Forum Members
Last Active: 11 Years Ago
Posts: 16,
Visits: 1
|
I'll try to explain it. For example in the picture scrolling_charts.png: I have three series in the one chart and then I want to have three series in the three maximized charts in a single view - so I can see first chart with first series and when I'm scrolling down I can see second chart with second series and when I'm scrolling down I can see third chart with the third series. Daniela
|
|
|
Nevron Support
|
|
Group: Forum Members
Last Active: 2 days ago @ 1:54 AM
Posts: 3,054,
Visits: 4,009
|
Hi Daniela, In that case you can simply add to the chart only the series you want to be visualized. For example for case one you'll have: someChart.Series.Add(series1); someChart.Series.Add(series2); someChart.Series.Add(series3);
for case 2: someChart.Series.Add(series1); etc. Will that work for you?
Best Regards, Nevron Support Team
|
|
|
Filip Mergental
|
|
Group: Forum Members
Last Active: 11 Years Ago
Posts: 16,
Visits: 1
|
Sorry, I mean something else - two or more large charts at the same time.
foreach (ChannelGraph ch in _doc.Channels) { chart = new NCartesianChart();
chart.BoundsMode = BoundsMode.Stretch; chart.Dock = DockStyle.Fill; chart.Margins = new NMarginsL(5, 5, 5, 5); chart.Location = ???;
nChartControl.Panels.Add(chart);
DrawSeries(i, chart); i++; }
|
|
|
Nevron Support
|
|
Group: Forum Members
Last Active: 2 days ago @ 1:54 AM
Posts: 3,054,
Visits: 4,009
|
Hi Daniela, You'll have to set the Location/Size properties of each chart in this case. Check out the following example shipped with the control: All Examples\Layout\Aligning Chart Area. It shows how to position charts in relative units, which is probably what you want + how to align them. Hope this helps - let us know if you meet any problems.
Best Regards, Nevron Support Team
|
|
|
Syrhey Karol'
|
|
Group: Forum Members
Last Active: Last Year
Posts: 21,
Visits: 74
|
Hello! I have 2 questions connected to this topic: 1) The executable file that can be run from here: Nevron Chart \ WinForm\ Examples C# (VB.NET) Contains 8 examples in “All Examples\Layout” point: - Multiple Charts and Legends - Fit Margin Mode - Stretch Margin Mode - Stacking Charts - Multiple Pies - Dual Horizontal Bar - Watermarks -Aligning Chart Areas But ‘Nevron.Examples.Chart.WinForm.VS2010’ solution \ ‘Layout’ folder contains only 4 examples: - NFitMarginModeUC - NMultipleChartsAndLegendsUC - NStretchMarginModeUC - NStretchMarginStackChartsUC And there is no ‘Aligning Chart Areas’ user control there. Could you point me where I can get that example, please?
2) Is it possible to add a splitter between 2 charts of that example and change their sizes in runtime? Best regards. Zonder.
|
|
|
Syrhey Karol'
|
|
Group: Forum Members
Last Active: Last Year
Posts: 21,
Visits: 74
|
I am sorry for the first question. I didn’t detect ‘View Source’ tab in the bottom of the example window.
But could you tell me Is it possible to add a splitter between 2 charts of that example and change their sizes in runtime?
|
|
|
Nevron Support
|
|
Group: Forum Members
Last Active: 2 days ago @ 1:54 AM
Posts: 3,054,
Visits: 4,009
|
Hi Zonder, Currently this is not supported, however you can use two charts in a split container and fix their axis zones sizes if you want to have the same effects. Fixing the zone size can be done like that: NCartesianChart chart = (NCartesianChart)nChartControl1.Charts[0]; int leftZoneSize = 50; chart.MinDockZoneMargins = new NMarginsL(leftZoneSize, 0, 0, 0); chart.MaxDockZoneMargins = new NMarginsL(leftZoneSize, 1000, 1000, 1000);\ this will lock the left zone size to fifty points. If you apply that to both charts you'll get left side alignment provided that the chart position/docking settings are the same. Hope this helps - let us know if you meet any problems.
Best Regards, Nevron Support Team
|
|
|
Syrhey Karol'
|
|
Group: Forum Members
Last Active: Last Year
Posts: 21,
Visits: 74
|
Hi!
Thank you very much for the solution.
I’ve normalized length of axis labels this way:
NLinearScaleConfigurator yScale = new NLinearScaleConfigurator(); yScale.LabelValueFormatter = new NNumericValueFormatter("00.00"); chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator = yScale;
But your solution is much more elegant.
Best Regards, Zonder.
|
|
|