BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
@{Html.EJ().Chart("chartYear")
.PrimaryXAxis(xAxis => xAxis.ValueType(AxisValueType.Category)
.MajorGridLines(mgl => mgl.Visible(true)
.Color("#a9a9a9").Opacity(0.12)))
.PrimaryYAxis(yAxis => yAxis.ValueType(AxisValueType.Double)
.LabelFormat("$ {value}")
.Title(title => title.Text("Sales"))
.Range(range => range.Min(0).Max(300).Interval(100))
.MajorGridLines(mgl => mgl.Visible(true)
.Color("#a9a9a9").Opacity(0.12)))
.CommonSeriesOptions(cr => cr.Tooltip(tt => tt.Visible(true).Format("#series.name# <br/> #point.x# : #point.y#mg")).Type(SeriesType.Column))
.Series(sr =>
{
sr.Name("Sales")
.Type(SeriesType.Column)
.DataSource((System.Collections.IEnumerable)ViewBag.datasourceYear)
.XName("Xmonth")
.YName("Sales")
.YAxisName("Sales").Add();
})
.Title(title => title.Text("Sales for the Year 2014"))
// .Depth(100)
//.WallSize(2)
//.Tilt(0)
//.Rotation(34)
//.PerspectiveAngle(90)
.Enable3D(true)
.Size(sz => sz.Height("200").Width("400"))
.Render();}
And when I try to navigate tot he page I get the following error
Unhandled exception at line 10, column 2637287 in http://localhost:50380/Scripts/ej/web/ej.web.all.min.js
0x800a138f - JavaScript runtime error: Unable to get property 'rowIndex' of undefined or null reference
Hi Fabio,
Sorry for the inconvenience
caused. We have analyzed the stated issue with our sample and we found that you
have specified “.YAxisName("Sales")”.
“YAxisName” in series should be
used only when there is multiple axes in chart and also this name should be
specified for any one of the axis in it.
By removing this, the sample is running without any exception/issue. Please find the attached sample.
Please let me know if you have any concern.
Thanks,
Jayavigneshwaran