I'm making some tooltip customization of DevExtreeme chart and I want to inject the string into js code in MVC project:
.Tooltip(t => t
.Enabled(true)
.Location(Model.Tooltip.Location)
.CustomizeTooltip(@<text>
function(arg) {
return {
text: @Model.Tooltip.Text
};
}
</text>)
)
The string looks like this:
Text = "arg.seriesName + \" years: \" + arg.valueText"
but on the output it is:
text: arg.seriesName +" years: " + arg.valueText
How to fix that? (& didn't help)
Thanks for your help
I have all the information which define the chart in the model. Here is the solution how it should be implemented:
The object TooltipDataPackage code is defined as follows: