Can not set margins in the ViewXY Chart

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
Felix
Posts: 72
Joined: Tue Oct 29, 2013 8:10 am

Can not set margins in the ViewXY Chart

Post by Felix » Mon Nov 25, 2013 9:47 am

Hi Pasi,

why I can not replace the margin of the chart, in the code?

code:

Code: Select all

lightningChartUltimate1.ViewXY.Margins.Right = 130;
I get in the studio the error message:
"Can not modify the expression Because it is not a variable"
Error Message
Error Message
Chart Margins.png (18.69 KiB) Viewed 6509 times
When I look at the definition, it is a normal property with set and get.
definition
definition
Definition.PNG (28.38 KiB) Viewed 6509 times

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

Re: Can not set margins in the ViewXY Chart

Post by ArctionPasi » Mon Nov 25, 2013 10:01 am

Margins is of type Padding. It's standard .NET object, and it doesn't allow modifying fields. You must create a new Padding object, and assign it to Margins.
chart.ViewXY.Margins = new Padding (....);
LightningChart Support Team, PT

Post Reply