I'm trying to get the simplest possible gridlines (vertical and horizontal). For the X Axis, im just calling MajorGrid.Visible=true, and its working just fine.
I cannot get the Y Axis to show gridlines (its overlayed Y-axes, with 1 visible at a time). I can get the minor to show up, but not major. What am I missing?
Thanks!
EDIT: It seems like the color is the issue. The X Axis has a gray color by default (which is good, it just 'works'). However the Y axis has its default color set to white\transparent (25,255,255,255). Its a strange difference...
Below I get no horizontal gridlines dispite all that code
ViewXY: Where are my gridlines?
Moderator: Queue Moderators
Re: ViewXY: Where are my gridlines?
Hi.
Both X and Y axis' major grid's default color is 50,255,255,255. You can double-check this by using WinForms demo application's property grid. Open for example "Point line" and use property grid to add a new axis and check its values.
Sounds strange that you have different values. Can you double-check your code and if the problem doesn't go away, can you send a demo project that shows this behavior so we can debug it.
Both X and Y axis' major grid's default color is 50,255,255,255. You can double-check this by using WinForms demo application's property grid. Open for example "Point line" and use property grid to add a new axis and check its values.
Sounds strange that you have different values. Can you double-check your code and if the problem doesn't go away, can you send a demo project that shows this behavior so we can debug it.
-
- Posts: 183
- Joined: Tue Mar 18, 2014 2:55 pm
Re: ViewXY: Where are my gridlines?
I figured out the issue, and it leads me to another question. My gridlines weren't showing because my X axis wasn't visible.
A follow up question: I need to have gridlines without a visible axis. Is there some way to accomplish this?
I know it doesn't make sense normally, but I have multiple charts stacked on top of each other; and only the bottom grid has a visible X axis.
A follow up question: I need to have gridlines without a visible axis. Is there some way to accomplish this?
I know it doesn't make sense normally, but I have multiple charts stacked on top of each other; and only the bottom grid has a visible X axis.
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: ViewXY: Where are my gridlines?
You can leave the axis.Visible = true, and trick with other properties
or you can just move the axis vertical position out of the chart area.
Code: Select all
axis.MouseInteraction = false;
axis.AxisThickness = 0;
axis.LabelsVisible = false;
axis.MouseScaling = false;
axis.MajorDivTickStyle.Visible = false;
axis.MinorDivTickStyle.Visible = false;
axis.Title.Visible = false;
Code: Select all
chart.ViewXY.AxisLayout.XAxesAutoplacement = Off;
axis.Position = 1000;
LightningChart Support Team, PT
-
- Posts: 183
- Joined: Tue Mar 18, 2014 2:55 pm
Re: ViewXY: Where are my gridlines?
Thanks Pasi!