Profile Picture

Bar Char 2nd Scale

Posted By Mike Holmes 2 Years Ago
Author
Message
Mike Holmes
Posted 2 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: 2 Years Ago
Posts: 11, Visits: 45
Hi,

I have a chart with 2 bar series, how can I show the scale of the 2nd bar series on the right hand side of the chart




Nevron Support
Posted 2 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
Hi Mike,

The following code shows how to position the axis on right side:

someAxis.Anchor = new NDockAxisAnchor(AxisDockZone.FrontRight, true);

You can also check the Axes \ General \ Docking example which shows how axis docking works.

Let us know if you have any questions.

Best Regards,
Nevron Support Team



Mike Holmes
Posted 2 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: 2 Years Ago
Posts: 11, Visits: 45
Thanks, have now got the 2nd scale showing, but is the same scale range the one on the left, I need it to be as per the range for bar2 which your demo shoes.


    m_BlueAxis = ((NCartesianAxisCollection)nChart.Axes).AddCustomAxis(AxisOrientation.Vertical, AxisDockZone.FrontRight);
    m_BlueAxis.Anchor = new NDockAxisAnchor(AxisDockZone.FrontRight, true);
    nBar2.DisplayOnAxis(m_BlueAxis.AxisId, true);
https://www.nevron.com/forum/uploads/images/1ee8073a-d2db-4c7a-8db0-d968.jpg

Nevron Support
Posted 2 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
Hi Mike,
Make sure you turn off scaling for the second bar on the primary Y-axis:

nBar2.DisplayOnAxis((int)StandardAxis.PrimaryY, false);

Let us know if you meet any problems.


Best Regards,
Nevron Support Team



Mike Holmes
Posted 2 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: 2 Years Ago
Posts: 11, Visits: 45
Thanks, that has worked

Mike Holmes
Posted 2 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: 2 Years Ago
Posts: 11, Visits: 45
is it possible on the left hand scale to include a pound sign as this is a value

Nevron Support
Posted 2 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
Hi Mike,

Yes, you can place a currency prefix by changing the value formatter associated with the Y axis:
NLinearScaleConfigurator scaleY = chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator as NLinearScaleConfigurator;
scaleY.LabelValueFormatter = new Nevron.Dom.NNumericValueFormatter("$0.00");

More information on format .net format strings can be found here:
https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-numeric-format-strings

Let us know if you have any questions.

Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic