Category : chart.js

How can I set the tooltip color to my line color? As you can see the tolltip colors are set to default. Im using ng2-charts in angular 11. Config: public chartType: ChartType = ‘line’; public chartLabels: Label[] = [‘13.04’, ‘14.04’,’15.04′,’16.04′,’17.04′,’18.04′,’19.04′]; public chartOptions: ChartOptions = { responsive: true, tooltips: { mode: ‘index’, intersect: false, }, maintainAspectRatio: ..

Read more

I try to fetch data from MySQL to my project using angular to show a line chart. I get the diagram but it shows nothing. I am trying to follow this link https://ej2.syncfusion.com/angular/documentation/chart/working-with-data/#remote-data my ts code: import { Component, OnInit } from ‘@angular/core’; import { DataManager, Query } from ‘@syncfusion/ej2-data’; @Component({ selector: ‘app-diagram’, templateUrl: ‘./diagram.component.html’, ..

Read more

enter image description here I get this problem and I dont understand what can I do to solve this Type ‘{ display: true; }[]’ is not assignable to type ‘_DeepPartialObject<{ type: "linear"; } & CartesianScaleOptions & { beginAtZero: boolean; suggestedMin?: number | undefined; suggestedMax?: number | undefined; grace?: string | number | undefined; ticks: { ..

Read more

I want format the Tooltip to have this format: APP : 111 not APP 111:111 I tried : tooltips: { callbacks: { title: (Items: any, data: any)=> data.datasets[0].data[Items[0].index], label: (Items: any, data: any) => data.datasets[Items.datasetIndex].data[Items.index] } } But not workin, how can I modify this please, thanks for your help Source: AngularJS..

Read more

const gainContext = this.gainRef.nativeElement.getContext(‘2d’) gainContext.canvas.height = ‘300px’ new Chart(gainContext, createChartConfig(gainConfig)) function createChartConfig({type, labels, data, label, color}: ChartConfig): ChartConfiguration<“line”>{ console.log(‘3 Chart.defaults’, Chart.defaults) return { type: “line”, data: { labels, datasets: [ { label, data, borderColor: color, stepped: false, fill: false } ] } } This is not working: It not recognize the type property as it ..

Read more