Profile Picture

get the start value of axis

Posted By Manal Goyal 6 Years Ago
Author
Message
Manal Goyal
Posted 6 Years Ago
View Quick Profile
Forum Member

Forum Member (44 reputation)Forum Member (44 reputation)Forum Member (44 reputation)Forum Member (44 reputation)Forum Member (44 reputation)Forum Member (44 reputation)Forum Member (44 reputation)Forum Member (44 reputation)Forum Member (44 reputation)

Group: Forum Members
Last Active: 5 Years Ago
Posts: 29, Visits: 405
Hi,

I want to add some pointers to my graphs to showcase that some event took place at some time(X axis of my graph is date time axis), now these events does not correspond to any values at y axis. they are just like a pointer to show the user that an outside event occurred at this point. now, I want to show these events at the bottom of the chart so that they can be easily visible, for which I think I might get the start value of y axis and then set that as the series value?I dont know can anyone suggest best way to do that!!

please see the attached pics for better understanding.






Nevron Support
Posted 6 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: 8 hours ago
Posts: 3,054, Visits: 4,009
Hi Manal,
We just uploaded a new SP of the control which features control over the tick marks shape in 2D cartesian charts similar to the one already present in the Gauge. You can use this feature in combination with a secondary X axis - for example:


NChart chart = nChartControl1.Charts[0];
NLineSeries line = new NLineSeries();

for (int i = 0; i < 10; i++)
{
line.Values.Add(i);
}

chart.Series.Add(line);

line.DisplayOnAxis(StandardAxis.SecondaryX, true);

NLinearScaleConfigurator customTicks = new NLinearScaleConfigurator();
customTicks.MajorTickMode = MajorTickMode.CustomTicks;
customTicks.CustomMajorTicks.Add(6);

customTicks.OuterMajorTickStyle.Shape = ScaleTickShape.Triangle;
customTicks.OuterMajorTickStyle.Width = new NLength(5);
customTicks.OuterMajorTickStyle.Length = new NLength(6);
customTicks.OuterMajorTickStyle.FillStyle = new NColorFillStyle(Color.Red);

// disable ticks / ruler
customTicks.AutoLabels = false;
customTicks.RulerStyle.Height = new Nevron.GraphicsCore.NLength(0);
customTicks.OuterMinorTickStyle.Visible = false;
customTicks.InnerMinorTickStyle.Visible = false;
customTicks.InnerMajorTickStyle.Visible = false;

chart.Axis(StandardAxis.SecondaryX).Anchor = new NDockAxisAnchor(AxisDockZone.FrontBottom, false);
chart.Axis(StandardAxis.SecondaryX).Visible = true;
chart.Axis(StandardAxis.SecondaryX).ScaleConfigurator = customTicks;

Hope this helps - let us know if you have any questions.

Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic