get the start value of axis


Author
Message
Manal Goyal
Manal Goyal
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
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
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
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


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search