ViewXY: Where are my gridlines?

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Arction_LasseP

greggorob64
Posts: 183
Joined: Tue Mar 18, 2014 2:55 pm

ViewXY: Where are my gridlines?

Post by greggorob64 » Thu Jul 17, 2014 3:11 pm

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
Image

Image

ArctionJari

Re: ViewXY: Where are my gridlines?

Post by ArctionJari » Fri Jul 18, 2014 4:21 pm

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.

greggorob64
Posts: 183
Joined: Tue Mar 18, 2014 2:55 pm

Re: ViewXY: Where are my gridlines?

Post by greggorob64 » Mon Jul 28, 2014 4:36 pm

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.

Image

User avatar
ArctionPasi
Posts: 1366
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland

Re: ViewXY: Where are my gridlines?

Post by ArctionPasi » Thu Jul 31, 2014 7:28 pm

You can leave the axis.Visible = true, and trick with other properties

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; 
or you can just move the axis vertical position out of the chart area.

Code: Select all

chart.ViewXY.AxisLayout.XAxesAutoplacement = Off;
axis.Position = 1000; 
LightningChart Support Team, PT

greggorob64
Posts: 183
Joined: Tue Mar 18, 2014 2:55 pm

Re: ViewXY: Where are my gridlines?

Post by greggorob64 » Wed Aug 06, 2014 4:18 pm

Thanks Pasi!