score:1
Accepted answer
In the customTooltips function you can access the datasets by this._data.datasets. Then you can loop trough the datasets to see if borderdash exist. In the example below I used .map to create new array.
let data = this._data.datasets
let borderDash = data.map((item,index) => {
return {
label:item.label,
index,
borderDash: item.borderDash?true:false
}
})
console.log(borderDash)
Source: stackoverflow.com
Related Query
- chartjs - How to access chart instance in a custom tooltip callback
- How to get access to Chart instance related to current tooltip callback in Chart.js
- How to access custom property in dataset object in Bar Chart in React ChartJS 2?
- chartjs : how to set custom scale in bar chart
- How to access labels array using chart plugin (Chart.pluginService.register) in Chartjs 2.x?
- ChartJS (React) Line Chart - How to show single tooltip with data and labels from 3 (multiple) dataset?
- ChartJS version 3 how to add percentage to pie chart tooltip
- How to create a custom tooltip for chartJS graph with data in JSON array in JavaScript?
- how to access class variables inside chart.js custom tooltip interface
- How to toggle between Custom tooltip and normal tooltip in chartjs and angular
- ChartJS add custom tooltip to a stacked bar chart
- How to set Custom tooltip event with Chartjs version 2.X
- ChartJs (ver: 2.8.0): Custom tooltip does not hide if clicked (or mouse pointer is moved) outside the chart canvas area
- How Can customize chartjs doughnut chart border and tooltip
- How Can I Get An Instance of a ChartJS Bar Chart Using Angular
- How do I prevent Chartjs tooltip callback returning multiple instances of the same value?
- How can I add functionality to Chartjs Doughnut chart custom legend
- ChartJS New Lines '\n' in X axis Labels or Displaying More Information Around Chart or Tooltip with ChartJS V2
- How to disable a tooltip for a specific dataset in ChartJS
- How to modify chartjs tooltip so i can add customized strings in tooltips
- Chart JS custom tooltip option?
- How to fix chart Legends width-height with overflow scroll in ChartJS
- How to retrieve ChartJS instance after initialization
- show label in tooltip but not in x axis for chartjs line chart
- ChartJS add tooltip to a grouped bar chart
- ChartJs custom tooltip position
- chart js tooltip how to control the data that show
- Chart js v2 tooltip callback line breaks
- How to disable Chart JS tooltip when there is no value?
- How do I obtain a Chart instance for Chart.js
More Query from same tag
- 2 Line Chart with different labels | Chart.js
- React chart.js dynamic data update not rendering
- Create charts with a loop in Django with charts.js
- When using chart.js to draw a line chart, if the peak is between two x values instead of "at a x value"
- How to create a histogram in charts.js with MYSQL data
- Chart.js Example Code not working
- How to set plural label values in chart.js
- angular-chart zero dimensions inside angular-strap panel
- Chartjs - legends take up too much space on mobile devices
- integrate a scroll bar along with chartjs-zoom-plugin
- Updating chart.js chart with dataset of different size
- chartJS, how to disable user from clicking on legend names and changing the graph?
- Gantt Chart Timeline Chart js 3
- Creating mixed Bar Chart with ReactJS using recharts or react-chartjs-2
- php to json to chart.js
- Dynamic Chart in PHP using Chart js
- Customize Pie Chart Legend in chart.js
- How to limit number of displayed points in chart.js?
- (MVC) Is this an efficient way of displaying chart data by date?
- Regrouping data chartjs
- Django Serializers - Return the sum of values by filter
- How can I export data from a csv file or excel file to a javascript object?
- Chartjs v2 stroke shadow
- ChartJs doesn't display the line item legend
- Printing a list by clicking chart Chart js + react
- Bar labels in Legend
- While placing chart.js Doughnut Chart inside Primeng Carousel, the text inside the canvas seems blurred/distorted a little bit
- using dynamic array in chartJs for label and data
- keep 2 chart.js contained in a div
- chart.js - how to draw and manage line when only one label present in chart js Linechart