Profile Picture

Change my axis display to start at 70 instead for 0

Posted By Jeffrey Schipper 14 Years Ago
Author
Message
bob milanov
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)

Group: Forum Members
Last Active: 6 Months Ago
Posts: 153, Visits: 11

Hi Jeffrey,

You can change the Y axis view for this purpose - for example:

chart.Axis(StandardAxis.PrimaryY).View = new NRangeAxisView(new NRange1DD(70, 70), true, false);

Will make the Y Axis to start from 70.

Let me know if you meet any problems.

Best regards,
Bob

 


 



Jeffrey Schipper
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 1, Visits: 1

I have a bar chart the values are close and I would like more detail.  I would like to start the Y display at 70 instead of 0

int AS400ARD120 = 0;

NChartControl1.BackgroundStyle.FrameStyle.Visible = false;

// set a chart title

NLabel header = NChartControl1.Labels.AddHeader("Percent Current");

header.TextStyle.FontStyle = new NFontStyle("Times New Roman", 30, FontStyle.Bold);

header.TextStyle.ShadowStyle.Type = ShadowType.LinearBlur;

header.ContentAlignment = ContentAlignment.BottomRight;

header.Location = new NPointL(

new NLength(32, NRelativeUnit.ParentPercentage),

new NLength(2, NRelativeUnit.ParentPercentage));

NChart chart = NChartControl1.Charts[0];

// setup chart

chart = NChartControl1.Charts[0];

chart.Enable3D = true;

chart.BoundsMode = BoundsMode.Stretch;

chart.Location = new NPointL(

new NLength(7, NRelativeUnit.ParentPercentage),

new NLength(13, NRelativeUnit.ParentPercentage));

chart.Size = new NSizeL(

new NLength(75, NRelativeUnit.ParentPercentage),

new NLength(70, NRelativeUnit.ParentPercentage));

NLinearScaleConfigurator scaleConfiguratorY = chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator as NLinearScaleConfigurator;

scaleConfiguratorY.MaxTickCount = 50;

NStandardScaleConfigurator scaleConfiguratorX = (NStandardScaleConfigurator)chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator;

scaleConfiguratorX.MajorTickMode = MajorTickMode.AutoMaxCount;

scaleConfiguratorX.AutoLabels = false;





Similar Topics


Reading This Topic