[Chartjs]-Customize Chartjs 2.x tooltip

1👍 ✅ In the options set tooltips.mode to label options: { …… tooltips: { mode: ‘label’, }, ……. } var chartColors = { red: ‘rgb(255, 99, 132)’, orange: ‘rgb(255, 159, 64)’, yellow: ‘rgb(255, 205, 86)’, green: ‘rgb(75, 192, 192)’, blue: ‘rgb(54, 162, 235)’, purple: ‘rgb(153, 102, 255)’, grey: ‘rgb(231,233,237)’ }; var randomScalingFactor = function() { … Read more

[Chartjs]-Change chart.js options based on window width

1👍 ✅ Let us introduce a new option hideXAxesWhenChartIsXXS. This option will enable hiding of all x-axes when the chart’s width is less than 480 pixels. The hideXAxesWhenChartIsXXS option will be read by the toggleXAxesDisplayPlugin plugin. If the option is defined and true, then the plugin will decide whether the x-axes will be displayed or … Read more

[Chartjs]-Stacked Bar chart fixed width bar chart issue – Chartjs

1👍 ✅ Replace barPercentage with categoryPercentage and fiddle with its value until you get what you want. When you have a stacked bar chart, you get one bar per category, so I guess this is the reason barPercentage is ignored, while categoryPercentage works fine. [Chartjs]-Tooltip overriding the text in chart js Source:stackexchange.com

[Chartjs]-Chart JS not working with Phonegap

1👍 ✅ i could fix the issue =) The issue was caused by setting the div temp_graph_div.style.display = ‘inherit’; after creating the chart. Now, my code looks like this (no big change, but big success): var temp_graph_div = document.getElementById(‘temp_graph’); temp_graph_div.style.display = ‘inherit’; var canvas = document.getElementById(‘myChart’), ctx = canvas.getContext(‘2d’), startingData = { labels: [tempValues[9][3], tempValues[8][3], … Read more

[Chartjs]-Set Scope in Angular-Charts.js after rendering

0👍 ✅ When you change a chart’s option after it was render, you need to call the update function. .update(duration, lazy) Triggers an update of the chart. This can be safely called after replacing the entire data object. This will update all scales, legends, and then re-render the chart. Documentation Example: // duration is the … Read more