Major grid lines for chart in Viewbox

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
ShawnCG
Posts: 57
Joined: Tue Oct 15, 2013 8:31 pm

Major grid lines for chart in Viewbox

Post by ShawnCG » Mon Mar 24, 2014 11:31 pm

When placing a LightningChart inside a Viewbox, major grid lines do not always show up well when the window size is decreased. See the following screenshots for example. Is there any way to improve the grid line appearance? For example, is there a way to make the line thickness greater for the major grid?
Example where the grid lines look fine.
Example where the grid lines look fine.
LightningChartInViewBox-LooksFine.PNG (90.98 KiB) Viewed 6981 times
Example where some of the grid lines disappear.
Example where some of the grid lines disappear.
LightningChartInViewBox-GridLinesDisappear.PNG (53.17 KiB) Viewed 6981 times
I've attached a sample project so hopefully you can reproduce what we're seeing.
LCViewBoxExample.zip
(10.19 KiB) Downloaded 689 times

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

Re: Major grid lines for chart in Viewbox

Post by ArctionPasi » Tue Mar 25, 2014 8:37 am

Hi Shawn,

The ViewBox takes a capture of child control (like LightningChart here), and renders it stretched. Stretching smaller removes pixels.

We can add grid line width adjustment in future version of LightningChart (we'll probably do that anyhow), but you'll face other problems then. Axis division ticks, borders etc. thin lines don't get rendered if scaled just 'right'.

So I'd recommend using some other approach than ViewBox perhaps. Unless there's some property setting in ViewBox.CacheMode that could solve the bitmap rescaling problem. By quickly experimenting, I couldn't find such.
LightningChart Support Team, PT

Post Reply