Group: Forum Members
Last Active: 4 Years Ago
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 ? 74% of original size (was 684x19) - Click to enlarge 
|
Group: Forum Members
Last Active: Last Month
Posts: 3,055,
Visits: 4,055
|
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 .&# 100 ; ocument . 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
|
Group: Forum Members
Last Active: 4 Years Ago
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 ?
|
Group: Forum Members
Last Active: Last Month
Posts: 3,055,
Visits: 4,055
|
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
|