get the start value of axis


https://www.nevron.com/Forum/Topic12509.aspx
Print Topic | Close Window

By Manal Goyal - 6 Years Ago
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.




By Nevron Support - 6 Years Ago
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.