Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
110
How to dynamically create a igDataChart in MVC using Razor that includes Tooltips for each series created.
posted

I have a Line chart page that will allow users to Add stock symbols to the chart displaying the Date and Last Sale in MVC using Razor. I have a ActionResult that will return a Model with the data. Looking at the examples on the site you need to have a script block for each X Axis Series if you want to display the ToolTips.It seems you also have to set the series.TooltipTemplate() with the name of the Script block you would create on the page also.

It seems that I have to re-draw the Html.Infragistics().DataChart() each time so I can properly set the Axis and Series at the same time create script blocks and set the ID="" to the same name as the series.TooltipTemplate() name.

Is there any example of how to handle this situation. The User can Add up to 5 stock symbols to the chart so I will not know how many series there will be until the user interacts with the chart page.

Thanks for any help

Parents
No Data
Reply
  • 1775
    Suggested Answer
    posted

    Hi, AchillesNet

    One more thing to add to the answer of Maya.

    You don't need different tooltip templates for different chart series per se. If the data bound to different series has the same structure but it is filtered to different stock symbols, for example, you can safely use one and the same tooltip template.

    Cheers, Lazar

     

Children
No Data