This is a migrated thread and some comments may be shown as answers.
Series.Notes.Visual -> problem with call JS method
1 Answer 6 Views
This is a migrated thread and some comments may be shown as answers.
ITsolution
Top achievements
Rank 1
ITsolution asked on 22 Jan 2021, 02:48 PM

Hello,

 

I'm trying to show difference between columns on Kendo chart. I made a js function and I have found solution for Kendo UI, I'm trying to rewrite it to Kendo MVC but some issue - with calling js method - occured and don't have idea how can I resolve it.

 

Part of the code:

.Series(series => series.Column(column => column.NewUsers)
    .Name("New users")
    .Color("#007DC5")
    //.Visual("testFunc"))                                       <- it's working
    .Notes(n => n.Visual("testFunc")))                  <- it doesn't

 

so for now the commented line is working, but I've got my values instead of columns. I think the last line should work, because if I understood it well Notes means additional info (and it won't replace with columns), but it doesn't even enter to my method.

My function in js is:

function testFunc(e) { (...) }

 

I tried to do it with something like:

.Notes(n => n.Visual("testFunc()"))

.Notes(n => n.Visual("testFunc(this)"))

 

but in first case 'e' is undefined and in the second case this parameter is not the same as parameter in line which is working (//Visual("testFunc")), so I can't get my data to handle logic.

1 Answer, 1 is accepted

Sort by
0
George Gindev
Telerik team
answered on 26 Jan 2021, 04:19 PM

Hello,

The noteTextField field needs to be defined, in order to run the Visual function on it.

It can be defined like so:

.Series(series => series.Column(column => column.NewUsers)
    .Name("New users")
    .Color("#007DC5")
    .NoteTextField("myField")
    .Notes(n => n.Visual("testFunc"))

Please try this and let me know if it works or not. I would be happy to provide additional help.

 

Regards,
George Gindev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Chart
Asked by
ITsolution
Top achievements
Rank 1
Answers by
George Gindev
Telerik team
Share this question
or