Hello
Is there a way to have axes in the center of the graph? The origin of the axes should have the coordinate (0.0). See graphic.
Axes in the center of the graph
Moderator: Queue Moderators
Axes in the center of the graph
- Attachments
-
- 31-12-_2017_16-57-48.png (69.55 KiB) Viewed 12329 times
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: Axes in the center of the graph
Hi,
Yes, possible. LC has probably hundreds of properties to control axis positioning and layout.
Axes can be positioned by setting their Position property, as percents of chart width or height.
Automatic axis placement must be disabled.
e.g.
chart.ViewXY.AxisLayout.XAxisAutoPlacement = Off
chart.ViewXY.AxisLayout.YAxisAutoPlacement = Off
chart.ViewXY.XAxes[0].Position = 50
chart.ViewXY.YAxes[0].Position = 50
chart.ViewXY.XAxes[0].Title.Visible = false
chart.ViewXY.YAxes[0].Title.Visible = false
chart.ViewXY.XAxes[0].SetRange(-10,10)
chart.ViewXY.YAxes[0].SetRange(-10,10)
You may also want to set
chart.ViewXY.XAxes[0].VerticalAlign = Center
chart.ViewXY.YAxes[0].Alignment = Center
Yes, possible. LC has probably hundreds of properties to control axis positioning and layout.
Axes can be positioned by setting their Position property, as percents of chart width or height.
Automatic axis placement must be disabled.
e.g.
chart.ViewXY.AxisLayout.XAxisAutoPlacement = Off
chart.ViewXY.AxisLayout.YAxisAutoPlacement = Off
chart.ViewXY.XAxes[0].Position = 50
chart.ViewXY.YAxes[0].Position = 50
chart.ViewXY.XAxes[0].Title.Visible = false
chart.ViewXY.YAxes[0].Title.Visible = false
chart.ViewXY.XAxes[0].SetRange(-10,10)
chart.ViewXY.YAxes[0].SetRange(-10,10)
You may also want to set
chart.ViewXY.XAxes[0].VerticalAlign = Center
chart.ViewXY.YAxes[0].Alignment = Center
LightningChart Support Team, PT
Re: Axes in the center of the graph
Hi ArctionPasi, is it possible to have the axes positioned virtually anywhere you want on the screen?ArctionKestutis wrote: ↑Mon Jan 22, 2018 6:50 am Yes, as people lose weight with these shakes like it is shown in above example. Please set OFF corresponding chart.ViewXY.AxisLayout.?AxisAutoPlacement and set Position (Axes.Position as percents of chart width or height).
Last edited by Tichelin on Mon Dec 13, 2021 11:07 am, edited 2 times in total.
-
- Posts: 557
- Joined: Mon Mar 14, 2016 9:22 am
Re: Axes in the center of the graph
Yes, as it is shown in above example. Please set OFF corresponding chart.ViewXY.AxisLayout.?AxisAutoPlacement and set Position (Axes.Position as percents of chart width or height).