Skip to content
Advertisement

Tag: chart.js

how to show A2, B2, C2 labels using chartjs 3.2.0?

I am building a graph with chartjs but I required it to show the name of the stack a2, b2, c2. expected graph plugin for chartjs 3.2.0 is not working https://v2_0_0-rc_1–chartjs-plugin-datalabels.netlify.app/guide/getting-started.html Answer You can define a formatter that returns the stack name instead of the data value itself. The problem however is that the stack name will appear for each

Chartjs Plugin Deferred throws “Uncaught TypeError: Cannot read property ‘plugins’ of undefined” error

I want to lazy load charts generated by Chart.js. Unfortunately, when I’m loading the plugin I’m getting: I’m using and Here’s a minimal fiddle that illustrates the error https://jsfiddle.net/aqgst865/ Is there any way to fix this error or an alternative to lazy load Chart.js charts? Answer The deffered plugin is not compatible with version 3 of chart.js. To fix your

How to use a Data Array within a Chart JS dataset?

I have the following JSON, that I want to insert a chart using Chart JS: And I created a function to load this JSON into an Array: When I load this Array into the Chart, As below: No information on “datasets” appears to me, only the “label”, what is the mistake I am making? Graphic Image Answer Try to split

How to add images to chart labels with vue-chartjs?

I want to add flag icons under the country code labels but am completely stuck. Image of the chart with my current code The images are named BR.svg, FR.svg and MX.svg and are located under @/assets/icons/flags/ I am using vue@2.6.12 and vue-chartjs@3.5.1 in my project. This is my Chart.vue component: This runnable code below is the closest to a solution

ChartJS Email HTTP Request API

Given my chartJS config below I need to get something as close as the following Using Quickchart API, I am submitting the config through the URL, but I am having trouble setting the labels color? options:{legend:{labels:{fontColor: ‘white’}}, Gives me Update 2 I am trying to construct the URL but I am getting some issues; Which should render the following Answer

Advertisement