Multiple line charts in frame


Author
Message
Mike O'Ceirin
Mike O'Ceirin
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)
Group: Forum Members
Posts: 22, Visits: 184
I have this Line chart within a frame. I want to add another chart below it. The second chart relates strongly to the first part but for clarity I do not want to combine it with the first. Is that possible?
https://www.nevron.com/forum/uploads/images/065e03a5-a8de-4cd3-aec6-b9cf.jpg

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 Mike,

Yes, it is possible to align two chart panels - the following code shows the most simple case of two charts that split the control height:

// create a layout of two chart panels docked on top of each other
nChartControl1.Panels.Clear();

NCartesianChart chart1 = new NCartesianChart();
nChartControl1.Panels.Add(chart1);
chart1.BoundsMode = BoundsMode.Stretch;
chart1.Margins = new NMarginsL(5, 5, 5, 2.5f);
chart1.DockMode = PanelDockMode.Top;
chart1.Location = new NPointL(0, 0);
chart1.Size = new NSizeL(new NLength(0), new NLength(50, NRelativeUnit.ParentPercentage));

NCartesianChart chart2 = new NCartesianChart();
nChartControl1.Panels.Add(chart2);
chart2.BoundsMode = BoundsMode.Stretch;
chart2.Margins = new NMarginsL(5, 2.5f, 5, 5);
chart2.DockMode = PanelDockMode.Top;
chart2.Location = new NPointL(new NLength(0), new NLength(50, NRelativeUnit.ParentPercentage));
chart2.Size = new NSizeL(new NLength(0), new NLength(50, NRelativeUnit.ParentPercentage));

// you may want to align the chart by their left plot side
NSideGuideline guideLine = new NSideGuideline();
nChartControl1.document.RootPanel.Guidelines.Add(guideLine);

guideLine.Side = PanelSide.Left;
guideLine.Targets.Add(chart1);
guideLine.Targets.Add(chart2);

You can also take a look at the following desktop example:
All Examples \ Panels \ Guidelines \ Side guideline

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



Best Regards,
Nevron Support Team


Mike O'Ceirin
Mike O'Ceirin
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)
Group: Forum Members
Posts: 22, Visits: 184
Thank you for your help. I have tried to find the desktop example and have looked here Nevron Web Examples but it seems that is not the right place can you please help?
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 Mike,
You can open the following solution in VS:
C:\Program Files (x86)\Nevron Software\Nevron .NET Vision 2019.1 for VS2019\Examples\Chart\WinForm\CSharp\Nevron.Examples.Chart.WinForm.VS2019.sln

it contains the desktop examples. When you launch the solution just navigate to:
All Examples \ Panels \ Guidelines \ Side guideline

The code to configure guidelines is the same for WinForms and ASP.NET.
We hope this helps - let us know if you meet any problems.

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