We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Error in ej.web when mouse over chart result

Hello...

I have this code in a View of a MVC Proyect:

@(Html.EJ().Chart("container")

.ChartArea(ca => ca.Border(br => br.Color("#686868").Width(4).Opacity(1)))

.PrimaryXAxis(xaxis => xaxis.MajorGridLines(mg => mg.Visible(false)).Title(tit => tit.Text("Month")))

.PrimaryYAxis(yaxis => yaxis.Range(r => r.Min(10).Max(40).Interval(5)).LabelFormat("{value}C").AxisLine(al => al.Color("#808080")).Title(tit => tit.Text("Temperature in Celsius"))

.StripLine(str => {

str.Start(15).End(15.3).Text("").Visible(true).TextAlignment(StriplineTextAlignment.MiddleCenter).Color("#14B9FF").Font(ft => ft.Size("18px").Color("White")).ZIndex(ChartZIndex.Over).BorderWidth(0).Add();

})

)

.Series(ser => {

ser.Name("Germany").Type(SeriesType.Column).Border(st => st.Width(4)).Tooltip(tooltip => tooltip.Visible(true).Format("#point.x# : #point.y# C")).Points(po => {

po.X("Jan").Y(28).Add();

po.X("Feb").Y(27).Add();

po.X("Mar").Y(33).Add();

po.X("Apr").Y(36).Add();

po.X("May").Y(28).Add();

po.X("Jun").Y(30).Add();

po.X("Jul").Y(31).Add();

po.X("Aug").Y(27).Add();

po.X("Sep").Y(30).Add();

po.X("Oct").Y(23).Add();

po.X("Nov").Y(15).Add();

po.X("Dec").Y(17).Add();

})

.Width(4)

.Tooltip(to => to.Visible(true).Fill("white").Border(b => b.Color("black").Width(1)).Font(f => f.Color("black"))).Add();

})

.CommonSeriesOptions(cr => cr.EnableAnimation(true))

.Title(title => title.Text("Weather Report"))

.Legend(lg => lg.Visible(false))

.Load("loadTheme")

)

The result of this is the next Chart:

Graph

The chart is correct but when i pass mouse over the chart the ej.web library breaks and throw an error in this part:

  • if(b.drawType.toLowerCase()=="column"&&t.target)

An the error is:

  • Can not get the ' drawType ' property null reference or undefined

Error

How i can resolve this error?

Greetings.


6 Replies

DA Daniel March 4, 2015 06:32 PM UTC

The error only happen when i use the StipeLine property... if i delete that part of code... the graph Works well:

@(Html.EJ().Chart("container")

.ChartArea(ca => ca.Border(br => br.Color("#686868").Width(4).Opacity(1)))

.PrimaryXAxis(xaxis => xaxis.MajorGridLines(mg => mg.Visible(false)).Title(tit => tit.Text("Month")))

.PrimaryYAxis(yaxis => yaxis.Range(r => r.Min(10).Max(40).Interval(5)).LabelFormat("{value}C").AxisLine(al => al.Color("#808080")).Title(tit => tit.Text("Temperature in Celsius"))

)

.Series(ser => {

ser.Name("Germany").Type(SeriesType.Column).Border(st => st.Width(4)).Tooltip(tooltip => tooltip.Visible(true).Format("#point.x# : #point.y# C")).Points(po => {

po.X("Jan").Y(28).Add();

po.X("Feb").Y(27).Add();

po.X("Mar").Y(33).Add();

po.X("Apr").Y(36).Add();

po.X("May").Y(28).Add();

po.X("Jun").Y(30).Add();

po.X("Jul").Y(31).Add();

po.X("Aug").Y(27).Add();

po.X("Sep").Y(30).Add();

po.X("Oct").Y(23).Add();

po.X("Nov").Y(15).Add();

po.X("Dec").Y(17).Add();

})

.Width(4)

.Tooltip(to => to.Visible(true).Fill("white").Border(b => b.Color("black").Width(1)).Font(f => f.Color("black"))).Add();

})

.CommonSeriesOptions(cr => cr.EnableAnimation(true))

.Title(title => title.Text("Weather Report"))

.Legend(lg => lg.Visible(false))

.Load("loadTheme")

)



JA Jayavigneshwaran Syncfusion Team March 5, 2015 06:14 AM UTC

Hi Daniel,

Thanks for using Syncfusion product.

We have analyzed this with help of your sample code. But we are not able to reproduce the reported issue. No exception/ console error thrown on mouse move over chart.

The below screen shot shows this.

We have also attached a sample for your reference in the below location.
MvcApplication47.zip

If you still face any concern kindly revert back us by modifying this sample for your exact scenario and replication procedure. And also kindly share your product version details and web browser you are using to run this sample. These information will help us to find and fix the issue sooner.

Please let us know if you have any concern.

Thanks,

Jayavigneshwaran




DA Daniel March 5, 2015 07:18 PM UTC

Hello,

Thanks for the replay, I could not run the attachment example... I had to change the reference to my local library of Syncfusion because the project did not find:

  • Syncfusion.EJ (12.4450.0.24) --> C:\Users\Daniel\Desktop\MvcApplication47-1880253019-2\MvcApplication47\bin\Syncfusion.EJ.dll
  • Syncfusion.EJ.MVC (12.4400.0.24) --> C:\Program Files (x86)\Syncfusion\Essential Studio\12.4.0.24\Assemblies\MVC\MVC4\Syncfusion.EJ.MVC.dll

After this, i could build the Project but I had an exception in the "@Html.EJ().ScriptManager()" of the layout. The error says that cannot be null.

Did I forget something? I attached the solution for review.

On the other hand, i test again my solution and detected the following:

  • In VS, if I run it by default in Internet Explorer the application throw the error when i pass mouse over the chart
  • If I run it by default in Internet Explorer and copy the address to Chrome or Firefox... the application did not throw the error
  • If i run it by default in Chrome or Firefox... the application did not throw the error
  • If i run it by default in Chrome or Firefox and copy the address to Internet Explorer... the application did not throw the error

It's strange ... right?


Attachment: MvcApplication4718802530192_406f6ed6.rar


AT Anandaraj T Syncfusion Team March 6, 2015 12:48 PM UTC

Hi Daniel,

Thanks for the update.

We have analyzed the reported issue in Visual Studio with Internet Explorer as default browser but the issue is not reproduced. The sample can be downloaded from the following link

http://www.syncfusion.com/downloads/support/directtrac/118392/MvcApplication-924805106.zip

 

[Screenshot]

Chart in Internet Explorer

 

We would like to know the following information, so that we can provide a better solution.

Could you please let us know the version of Essential Studio you are using? We have tested our application in the latest version Essential Studio (12.4). If you are also using the latest version, we suggest you to create a support incident so that we can resolve the reported issue in a web meeting.

The information provided would be of great help in resolving the issue.

Please let us know if you have any concern.

Regards,

Anand




DA Daniel March 6, 2015 05:28 PM UTC

Hello,

I resolved the error... I added the library "ej.web.all.js" and changed the reference to this instead of "ej.web.all.min.js" which was using,

The version of Syncfusion was the latest.

Thanks again for the help.

Greetings.


AT Anandaraj T Syncfusion Team March 9, 2015 01:11 PM UTC

Hi Daniel,
 
We are glad to know that the issue has been resolved. Please let us know if you need further assistance on this, we would be happy to help you out.
 
Regards,
Anand



Loader.
Live Chat Icon For mobile
Up arrow icon