score:3
Accepted answer
you are using chart js v2 syntax on v1.
for v1
var barchartdata = {
labels: ["january", "february", "march", "april", "may", "june", "july"],
datasets: [{
label: 'dataset 1',
borderwidth: 1,
data: ["1","1","1","1","1","1","1"]
},
{
label: 'dataset 2',
borderwidth: 1,
data: ["1","1","1","1","1","1","1"]
}]
};
window.onload = function() {
var ctx = document.getelementbyid("zeitsteuerungchart").getcontext("2d");
var mybar = new chart(ctx).bar(barchartdata, options);
};
you can view chart options (chart js v1) here or complete options here
Source: stackoverflow.com
Related Query
- Chart.js Show labels on Pie chart
- chart.js: Show labels outside pie chart
- Chart.js how to show cursor pointer for labels & legends in line chart
- show label in tooltip but not in x axis for chartjs line chart
- chartjs show dot point on hover over line chart
- Chart JS Show HTML in Tooltip
- chart js tooltip how to control the data that show
- How to show percentage (%) in chart js
- Show X axis on top and bottom in line chart rendered with Chart.js 2.4.0
- Chart looks only grey, does not show the color - Chartjs,discordjs
- Chart JS show multiple data points for the same label
- Show data dynamically in line chart - ChartJS
- Chartjs - show elements in all datasets on hover using bar chart
- Remove the label and show only value in tooltips of a bar chart
- Chart Js Show the old data on mouse hover
- ChartJS: Show all labels of a mixed chart in the tooltip
- Show all values in Chart js y axis
- PrimeNg bar chart how to show a label for the y-axis
- Show "No Data" message for Pie chart with no data
- Show data on top of bar chart in Chart.js v 2.7.1
- Show labels on each sector to polar chart using angular js chart
- How to show data values in top of bar chart and line chart in chart.js 3
- Chart.js - How to show loading animation before plotting chart
- Show point values in Radar Chart using chart.js
- Chart js doesn't show chart
- ChartJS (React) Line Chart - How to show single tooltip with data and labels from 3 (multiple) dataset?
- Angular chart how to show the legend data value by default along with legend name
- How to show percentage (%) using chartjs-plugin-labels ( Pie chart ) in angular 2/8
- How to show gradient vertically on chart js grouped bar chart?
- How to show different product name for every bar in chart js
More Query from same tag
- Django and Chartjs template conflict
- Angular 6 ChartJS create canvas dynamically and create graph on it - an example?
- Chart.js not initiating
- ChartJS different border color for legend
- Chart.js - if there is not value show 0
- How to add text inside scatter plot using Chart.js?
- ChartJs is not working in angular 4 with no errors
- Real time colored bar chart
- Sequence of loading JavaScript <script> files
- Chartjs stacked bar single max value
- Chart.js - disable tooltip when cursor moves outside the main canvas
- Customise size of data points , height and width in Chart.js?
- Chart.js (v3) Doughnut with rounded edges, but not everywhere
- Adjust legend element alignment for chart.js
- Difficult displaying data with linechart in chart.js
- Using chart.js for isotopic patterns
- Set max value for each label with Chart.js
- How to set prop data for chart.js in React?
- Chartjs: Is it possible to add phases in line chart?
- How to set chartJs Doughnut labels on right side?
- Chart.js bar chart change the label position X-axis
- Add data to dynamically created Chart.js dataset
- UnitStepSize for regular time interval with Chartjs
- How I create a pie chart based on COUNT(php + mysql)?
- Why is this chartjs graph not being loaded? (Using Vue.js)
- Label not showing in Chart.js with Grails
- Rails application using chart.js optins
- Problems displaying yLabels in charts.js
- Chart.js Version 1 differences and can they be achieved in version 2?
- Draw vertical line on horizontalBar at value 2.0