Nevron Forum
Back
Login
Register
Login
Register
Home
»
Nevron Vision for NET
»
Nevron Chart for .NET
»
Bar Char 2nd Scale
Bar Char 2nd Scale
Post Reply
Bar Char 2nd Scale
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
Goto Topics Forum
Author
Message
Mike Holmes
Mike Holmes
posted 3 Years Ago
ANSWER
Topic Details
Group: Forum Members
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
Reply
Like
0
Nevron Support
Nevron Support
posted 3 Years Ago
ANSWER
Post Details
Group: Administrators
Posts: 3.1K,
Visits: 4.2K
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
Reply
Like
0
Mike Holmes
Mike Holmes
posted 3 Years Ago
ANSWER
Post Details
Group: Forum Members
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);
Reply
Like
0
Nevron Support
Nevron Support
posted 3 Years Ago
ANSWER
Post Details
Group: Administrators
Posts: 3.1K,
Visits: 4.2K
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
Reply
Like
0
Mike Holmes
Mike Holmes
posted 3 Years Ago
ANSWER
Post Details
Group: Forum Members
Posts: 11,
Visits: 45
Thanks, that has worked
Reply
Like
0
Mike Holmes
Mike Holmes
posted 3 Years Ago
ANSWER
Post Details
Group: Forum Members
Posts: 11,
Visits: 45
is it possible on the left hand scale to include a pound sign as this is a value
Reply
Like
0
Nevron Support
Nevron Support
posted 3 Years Ago
ANSWER
Post Details
Group: Administrators
Posts: 3.1K,
Visits: 4.2K
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
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Post Reply
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search