score:0
you can add this properties into your code:
scaleoverride : true,
scalesteps : 5,
scalestepwidth : 5,
scalestartvalue : 0,
score:1
is this what you are looking for?
var data = {
labels: ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"],
datasets: [
{
label: "my first dataset",
fillcolor: "#ffc069",
strokecolor: "rgba(220,220,220,1)",
pointcolor: "rgba(220,220,220,1)",
pointstrokecolor: "#ff9c85",
data: [45, 39, 40, 31, 26, 45, 10, 36, 25, 30, 2, 10]
}
]
};
var ctx = document.getelementbyid("mychart").getcontext("2d");
var mylinechart = new chart(ctx).line(data, {
// adjusting your scale labels
scalelabel: "<%=value/10%>m",
// adjusting your scale
scaleoverride: true,
scalesteps: 5,
scalestepwidth: 10,
scalestartvalue: 0,
// ajusting tooltips
tooltiptemplate: "<%if (label){%><%=label%>: <%}%><%= value / 10 %>m",
});
fiddle - http://jsfiddle.net/t0o07xbf/
Source: stackoverflow.com
Related Query
- how to change Y axis value dynamically based on user input in Chartjs for Line chart?
- How to Change the Y axis of an Primefaces 7.0 ChartJS Linechart with Java?
- How to change the Y-axis value in chartjs
- ChartJS fails to render one of the lines in cartesian chart following update after change to max Y axis label value
- How to change the color of legend in chartjs and be able to add one more legend?
- How do I change the 'months' language displayed on the date axis in Chart JS?
- How to change the cursor to a pointer when I hover over a bar in a ChartJS bar chart?
- Chartjs change the specific label color in x axis in callback function
- How do I fix over limit y axis value in ChartJS
- How to dynamically change the annotation value in Chart.js
- Chartjs change horizontal axis value
- How to Change the Label Strike-Through with light gray on a ChartJS Doughnut?
- How do I add time sourced from an external source as an X axis to a ChartJS graph?
- How to set the chartjs bar graph scale to the highest value in the result data
- Chartjs - how to change the notation of doughnut chart
- How to set y axis to the max dataset value in Chartjs?
- How can I change the cursor on pie chart segment hover in ChartJS 3?
- In ChartJS how do I change the color of a label in the legend?
- How to show tooltip value of all data falling on the same axis in chart js?
- How to change the z-index of chartjs annotations label?
- ChartJs - Labelling minimum and maximum value of the Y Axis
- How to change the color of y axis labels in different color in Chart.js
- how to show bar value on the top of each bar in chartjs
- How to sum the array value in javascript like chartjs data array and input value sum
- How do I change the grid line style on the Y axis in Chart.js?
- How can I display `Null` value data on Y Axis using the Primitive dataset format in Chart.js V3.7.0?
- How can I move chartJs legend left side and change the width and Hight of the chart?
- How do I change the label and value like 500,000 to 500k in Chart.js?
- How to change bar color acording to label value in chartjs
- How to set min Value a step down of min value received from database in Y Axis in ChartJS
More Query from same tag
- Multiple line labels for chart js
- Change position of Chart.js tick labels
- angular-chart.js doughnut chart : how to show data in the center of a chart
- date and time chart With Chart js
- How to make dynamic chart with the next view? What libraries allows to customise exactly this like in my design?
- Chart.js not showing data until I click on the label 3 times
- Add new chart.js when clicking a button, but get 'Cannot read property 'getContext' of null'
- Using data in HTML to display ChartJS Doughnut chart
- Chart.js v3: Tooltip callback doesn't identify clicked dataset of stacked bar chart
- jquery load with chart.js
- How to add a horizontal line at a specific point in chart.js when hovering?
- How to join two objects in array
- ChartJS passing data dynamically, then passing data into variables
- How To Format Scale Numbers in Chart.js v2
- make chartjs legend labels tabbable
- In Chart.js, how do I hide certain axis labels from a stacked bar chart?
- Full size download Chartjs canvas on mobile device
- Chart.js combined line and bar chart with differing data points
- How do I import a csv into chart.js?
- Format chart.js x labels
- Set size chartjs in div
- Javascript get JSON into arrays, combine and use elsewhere
- Legends in Chart.js, shows only one label
- Callback after line chart rendered
- Can't resolve 'chart.js/auto'
- Creating mixed Bar Chart with ReactJS using recharts or react-chartjs-2
- Line graph in Angular 7 not working - is data type proper?
- JQuery insertAfter() Method only works once when inserting a Chart.js chart
- Use chartjs-plugin-annotation 0.5.7 in Chartjs 2.9.x with React
- Chart.js dinamically populate data in Oracle Application Express