score:44
you are right, but only if you are using chart.js v1.x.
ticks options have changed in v2.x (the one you are using).
if you want to edit radar ticks, you will need to edit the
ticks
attribute in your chart options :
var options = {
scale: {
ticks: {
// changes here
}
}
};
from what you need (mak a scale from 0 to 5), you can either :
- set the attribute
beginatzero
to true andmax
to 5 - set the attribute
min
to 0 andmax
to 5
you can see here the result.
score:9
starting chartjs 3 the min/max scale values are not specified in scale.ticks
but in options.scale
or options.scales[id]
object, example :
new chart(hostelement, {
type: "radar",
data,
options: {
scale: {
min: 0,
max: 100,
},
},
});
https://www.chartjs.org/docs/latest/axes/radial/linear.html#linear-radial-axis :
scales.[x/y]axes.ticks.max was renamed to scales[id].max
scales.[x/y]axes.ticks.min was renamed to scales[id].min
score:16
set the value of stepsize
scale: {
ticks: {
beginatzero: true,
max: 5,
min: 0,
stepsize: 1
}
}
Source: stackoverflow.com
Related Query
- Set min, max and number of steps in radar chart.js
- How to set the xAxes min and max values of time cartesian chart in Chart.js
- How to set max and min value for Y axis
- ChartJS: How to set fixed Y axis max and min
- Chart.js timescale: set min and max on xAxes
- Set minimum number of steps in line chart
- ChartJS automatically scaled chart has undefined min and max
- How to set min max for x axis depend on data with Chartjs and Spring Boot?
- min and max tag is not showing in chart chart.js
- How to set only min and max values in y-axis (chart js)
- In Chart.js set chart title, name of x axis and y axis?
- Hide min and max values from y Axis in Chart.js
- Chart.js - Setting max Y axis value and keeping steps correct
- Chartjs: how to show only max and min values on y-axis
- Chartjs v2.5 - only show min and max on scale, absolute positioning on scale
- How do I force Chart.js axes min and max with react-chartjs-2?
- Chartjs - Set start and end value into a Bar Chart
- Setting up min and max in chartjs did not work
- ChartJS and Radar Chart animation
- How to set max smaller than min in ChartJS
- Bar chart with min height and zero values - ChartJs
- Setting min and max values chart.js
- Unable to set width and height on canvas in chart js
- Set max value of chart.js bar chart
- set my chart min yaxis to 0
- How to set minimum value to Radar Chart in chart js
- How do you set x and y axis and Title for a line chart using charts.js?
- Chart.js - Same min and max value of two charts
- How to set 3 axis in google chart (V-Axis Left as Qty, V-Axis Right as Series Column and H-Axis as TimeOrder)?
- ChartJs: x-axes min and max value not working
More Query from same tag
- ChartJS and Flask, how to pass data?
- Chart js shows old chart data when hover
- How to add datas to chart js from javascript array itself?
- Display data label (legend) in line-chart using chartjs
- Weird time formating with chart.js and moment.js
- ng2 charts on Angular 9 not responsive
- Charts.Js with Asp.Net Webforms Does Not Work
- How to send an array of object as a prop?
- ChartJS doesn't draw the chart
- Linear gradient width using percentage (%) instead of pixels (px)
- ChartJS Arrays Acting as One Item
- Blazor Chart.js 2.0.2 raises onClick error
- Saving ChartJS chart showing all tooltips
- Am I using chart.update() correctly when trying to update the chart?
- Creating and Updating Graph in HTML and Javascript
- Drawing a horizontal line on a stacked bar chart on hover (chart js)
- Data not fully displaying on bar chart
- Create a chart on a dynamically created canvas in Angular-chart.js
- How do you set pie chart colors in angular-chart.js
- Change Axis Line color in Chart created using chart.js
- the graph in the view is not displayed - Chart.js Angularjs
- graph of an equation animated javascript (crash game)
- Chart.js - Getting data from database using mysql and php
- Chart.JS Alternate background color for xAxis
- Chart.js chart doesn't render when using Angular 2
- How do I make the y-axis intersect the x-axis at 0 in chart.js
- How to create two x-axes label using chart.js
- How to fix [<br /> when trying to enter data through php in data (chart.js)
- How to change background color of labels in line chart from chart.js?
- chartjs cutoutPercentage and tooltips does not works in nextjs