score:2
Accepted answer
According to documentation if you want to create a Category Scale
should work like this:
.....
scales: {
yAxes: [{
scaleLabel: {
display: true,
labelString: "ms"
},
ticks: {
beginAtZero: true,
suggestedMax: 100,
}
}],
xAxes: [{
scaleLabel: {
display: true,
labelString: "sec"
},
ticks: {
beginAtZero: true,
max: "a-value-from-array"
}
}]
}
I'm tempted to guess that you are using a notation like:
var y = { ticks.max: "hello" }
VM181:1 Uncaught SyntaxError: Unexpected token .
I think that explains your error.
Source: stackoverflow.com
Related Query
- PrimeNG/Chart.js - max Number of labels to show
- Limit labels number on Chart.js line chart
- 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
- Display a limited number of labels only on X-Axis of Line Chart using Chart.js
- Line chart with large number of labels on X axis
- ChartJS: Show all labels of a mixed chart in the tooltip
- PrimeNg bar chart how to show a label for the y-axis
- Show labels on each sector to polar chart using angular js chart
- ChartJS (React) Line Chart - How to show single tooltip with data and labels from 3 (multiple) dataset?
- Chart.js: How to get x-axis labels to show on top of bars in bar chart
- Inverting X axis number labels in chart.js scatter chart
- How to show the chartjs bar chart data values labels as text?
- how can i show labels and value in both on bar chart
- Char.js - How to show labels by default in pie chart
- Chart.js how to show line chart without displaying the labels on xaxis and yaxis
- How remove duplicates xAxis labels and show all values on chart
- Chart.JS: Show custom labels permanentely on doughnut chart
- How to show bar chart labels clearly using ChartJS?
- Chart js always show labels on a doughnut chart
- Show the latest labels in a bar chart with React.js using react-chartjs
- how to show X and Y labels on points in Chart js 2 Line Chart
- PrimeNg Pie Chart - By default show all tooltip?
- How to show labels above pie chart in chart.js
- ChartJS New Lines '\n' in X axis Labels or Displaying More Information Around Chart or Tooltip with ChartJS V2
- Set min, max and number of steps in radar chart.js
- Chart JS data labels getting cut
- Chart.js: only show labels on x-axis for data points
- How to display Line Chart dataset point labels with Chart.js?
More Query from same tag
- Chart.js setting maximum bar size of bar chart
- Pie chart not working using angular and ng2-charts
- chart.js - problems with axes options - what am I doing wrong?
- Meteor with Chart js cannot read property ‘getContext’ of null only AFTER new document in collection?
- How do I get tool tips to work on 2 data set half doughnut chart?
- Showing points data withou hover chartjs
- ChartJS: How to set fixed Y axis max and min
- How to make gap in chart.js graph?
- Remove gap when updating ChartJS
- real time scrolling based chart with chart.js
- Multiple charts in one page with chart.js
- Chart.js2 Radar, how to configure the label padding/spacing?
- Chart.Js - Display only specific (fixed) X axis labels
- chart.js not getting rendered inside ng-template in angular
- Non-static values for chart using CanvasJS?
- Stacked horizontal chart. How to trigger individual hover in the stacked element?
- Where does chartjs document what is required in the myChartConfig to instantiate using myChart = new Chart(ctx, myChartConfig)
- Hiding xAxis labels when using Chart.js
- how to group the chart
- Converting JSON data into Chart.js array from strings
- Manipulate chart.js based plots in R (radarchart)
- chart.js charts wouldn't show or hide with Angular directives ng-show and ng-hide
- How To Use Api Data With Vue Chart.js
- How to show slice value inside of slice in pie chart using chart.js
- "Inline" labels in ChartJS
- ChartJS: Show all labels of a mixed chart in the tooltip
- Is it possible to get the assigned ref name in a component? Vue.js
- Chart.js - Font only renders after you reload the canvas
- Chart.js; Chart is not showing time and imported data.
- Refencing a plugin in ChartJs.Blazor