/
githubmirror
/
Chart.js
Обзор
Документация
Войти
/
githubmirror
/
Chart.js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/types/interaction.ts
17 строк
439 B
Dan Onoshko
fix: move types to src dir to escape src / dist dirs in paths (#10993)
16 дек 2022, 15:56
Не верифицирован
16 дек 2022, 15:56
64a0278
Код
Авторство
О чём код?
import { Chart, ChartData, ChartConfiguration, Element } from '../../src/types.js'; const data: ChartData<'line'> = { datasets: [] }; const chartItem = 'item'; const config: ChartConfiguration<'line'> = { type: 'line', data }; const chart: Chart = new Chart(chartItem, config); type Item = { element: Element, datasetIndex: number, index: number } const elements: Item[] = []; chart.updateHoverStyle(elements, 'dataset', true);