This is a migrated thread and some comments may be shown as answers.

Formatting series item notes

2 Answers 322 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 06 May 2019, 04:41 PM
I've got a scatter line chart that I want to add data item notes that will be built from fields in the data item.  Currently I'm able to use a template to format tooltips dynamically (see code below).  Is there a similar way of accomplishing this with notes?  The only samples I can see use the  noteTextField on the kendo-chart-series-item which implies adding an additional field on source data items, generating the content for each item in code, and not having the ability to format the contents.  I am I missing something?

  <kendo-chart-series-item-tooltip>
      <ng-template let-dataItem="dataItem">
          <span style="font-weight: bold">{{dataItem.productName}}</span> - Total Count
          <span style="font-weight: bold">{{dataItem.totalCount}}</span>
         <span style="font-weight: bold">{{dataItem.date | amDateFormat:'LL' }}</span>
    </ng-template><b
  </kendo-chart-series-item-tooltip>

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimiter Topalov
Telerik team
answered on 07 May 2019, 11:24 AM
Hello Mike,

You can customize the notes content either by creating a custom visual:

https://www.telerik.com/kendo-angular-ui/components/charts/api/SeriesNotes/#toc-visual

... or by setting the NotesLabel content depending on the data item, associated with each point, e.g.:

https://stackblitz.com/edit/angular-ri9nqp-qxcr4c?file=app/app.component.ts

I hope this helps.

Regards,
Dimiter Topalov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Mike
Top achievements
Rank 1
answered on 07 May 2019, 12:05 PM

Thanks for the prompts response, Dimiter.

I was hoping it was as straightforward as the slick support for formatting tooltips, but looks like I'll have to go the custom visual route to get the formatting I want.

Thanks,

Mike

 


Tags
Charts
Asked by
Mike
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Mike
Top achievements
Rank 1
Share this question
or