Nevron Forum

Custom axis

https://www.nevron.com/Forum/Topic3061.aspx

By José Delgado - Thursday, February 11, 2010

Hi.

I've just updated to version Q1 2010 of Nevron WinForm Chart. When I try to rebuild a code made with version Q2 2008, I've discovered the following error message:

'AddCustomAxis' is not a member of 'Nevron.Chart.NAxisCollection'

This is due to the following lines of code:


dim Grafico1 as NChart
Grafico1 = ControlChart.Chart(0)

(...)

Dim EjeY as NAxis
EjeY = Grafico1.Axes.AddCustomAxis(AxisOrientation.Vertical, AxisDockZone.TopLeft)


When I've revised the code, this method does not exist.

My question is: how to add a custom axis to a chart?

Sincerely

JD
By Blagovest Milanov 1 - Friday, February 12, 2010

Hi José,

The AddCustom axis has been moved to the NCartesianAxisCollection (as some axis collections do not support custom axes, with the same parameters). To add a custom axis to a cartesian chart you can use the following code:

Dim chart As NChart = NChartControl1.Charts(0)
Dim axis As NAxis
axis =
CType(chart.Axes, NCartesianAxisCollection).AddCustomAxis(AxisOrientation.Vertical, AxisDockZone.TopLeft)

Hope this helps - let me know if you meet any problems...

Best regards,
Bob

 

By José Delgado - Monday, February 22, 2010

Ok. It works! ... But note that documentation file is out of date.

J.D.