score:5
Accepted answer
Interestingly, if I change the code as follows:
var chart = new Chart(ctx).Line(data, ctxOptions);
the legend works as expected!?
A bug with chart.js?
score:1
Try
legendTemplate: function(data) { return "<ul>LEGEND</ul>"; }
instead. Seems like some bug in the chart.js.
Source: stackoverflow.com
Related Query
- angular-chartjs line chart TypeError: t.merge is not a function
- Chart.js - generateLegend() call results in "undefined is not a function"
- Chart.js update function (chart,labels,data) will not update the chart
- code works fine on jsfiddle but one function is not working on website
- Doughnut chart from Chart.js, custom legend and call of original handler not works as expected
- $scope variable do not respond to the onClick function of angular chart
- Destroying chart.js is not working when chart created inside function - chart.destroy() is not a function
- Chart is not populating when getting the data from AJAX call
- I am using chart js to draw a chart. I did everything right but i don't know why the x axis and y axis label is not comming in chart. code below
- chartjs line graph destroy function is not clearing the old chart instances
- Trying to call API and plot a line chart but it does not show
- e.labels.map is not a function when creating a chart with chart.js
- how to not repeat code while creating multiple charts in chart js
- chart js onclick function call
- Converting Chart.js canvas chart to image using .toDataUrl() results in blank image
- ReferenceError: Chart is not defined - chartjs
- Chart Js Cannot read property 'length' of undefined
- Chart.js: bar chart first bar and last bar not displaying in full
- Chart.js responsive option - Chart not filling container
- show label in tooltip but not in x axis for chartjs line chart
- using vue-chartjs in vue 3 : createElement is not a function
- Html chart does not fit a small Android WebView
- Chart.js ng2-charts colors in pie chart not showing
- Chart.JS Mixed Chart - Bars Not Showing
- Chart looks only grey, does not show the color - Chartjs,discordjs
- Angular-chart.js - Make line chart does not curve
- Blank PNG image using Chart JS . toBase64Image() function
- Chart.js line chart is not displaying
- Chart.js: width and height of a pie chart not respected
- Chart.js t.ticks.map is not a function
More Query from same tag
- findOne returns undefined in onRendered
- How to ignore points with same value in Chart.js
- javascript chart.js remove last point
- Why is my Chart.JS canvas not destroying?
- Chart.Mvc scale begin at 0 - Nullable bool property remains null
- How to highlight a section of a stack in all bars in a stacked barchart in chartjs
- Chart.js move start position of chart from axis
- Chartjs Nested Doughnut Layers With Different Thickness
- How to grouping Label In Char JS
- Keep two Pie Charts Side by Side
- How to change X-axis interval in chart.js
- How can I remove two labels from my legend with an alternative to item.datasetIndex !== 1 && item.datasetIndex !== 4; ? (Charts.js)
- Chart.js repeating colors?
- Chartjs unselected lines on render
- chart-options not registering scaleStartValue
- Line chart with a lot of data: skip labels
- Chart JS - Make chart scrollable if too much data
- How can I draw dotted line using chartjs?
- Chart.js: Disable Y-Axis, when graph is disabled via Legend
- polarArea Chart.js starting from zero
- Using ChartJS to create a multiple grouped bar chart - see picture below
- Create New Array from Existing Array Values With Unique and Sum
- How to control width of chart using angular-chart and chart.js?
- why my multiple chart.js does not work properly?
- fill: 'origin' property does not work for my chart
- How to change number to $ with commas? Chart.js
- Tooltips on multiple charts in chart.js showing the wrong values
- how to minimize x axis labels to day hours in chart js
- Jinja throughs "SyntaxError: expected property name, got '%' " error
- In chartjs, add link text on tooltip