Set Tickpositions

113 Views Asked by At

I work for the first time with the Dotnet.Highcharts framework in Visual Basic and I need your help. I want to set the tickpositions, but I do not know how.

code snippet:
.SetYAxis(New YAxis With {.GridLineWidth = 0, _
         .Title = New YAxisTitle With {.Text = "test text"}, _
         .Min = 1, _
         .Max = 3, _
         .TickPositions = ??? })

Thanks for help

1

There are 1 best solutions below

1
On BEST ANSWER

The TickPositions property of the YAxis class is of type Number?() which is an array of a specific Highcharts type to represent numbers

There are implicit conversion operators in the code for Number from int, double, and nullable ints and doubles, as well as constructors, so defining an array of them can be as easy as:

Dim tickPositions as Number?() = New Number?() {1, 2.5, new Number(123)}

or in your inline code:

.TickPositions = New Number?() {1, 2.5, new Number(123)} })