score:1
Accepted answer
Chart.js lets you add a line to a bar chart, but not a bar to a line chart. So you need to set the chart type to bar, e.g.:
var config = {
type: 'line', // <-- change to 'bar'!
...
Source: stackoverflow.com
Related Query
- Mixed Diagram (Line/Bar) with two y-Axis won't display data on 2nd Axis
- Display two line graphs with data starting at different points
- chartjs display data in one bar line with 3 different data sets in 3 different colors
- Chartjs 2 - Stacked bar and unstacked line on same chart with same y axis
- Chart.js Mixed Bar and Line chart with different scales
- ChartJs line chart - display permanent icon above some data points with text on hover
- Chart.js with dual axis on bar and line graph
- Chart.js two y axes line chart tooltip value incorrect for 2nd y axis
- Chart.js combined line and bar chart with differing data points
- Why does putting two data sets with a Time Cartesian axis in Chart.js cause two Y axis tick sets?
- django + chart.js : Cannot get two bar charts on the same graph with appropriate data
- I would like to show a line bar in chart.js with data automatically fetched from mockapi
- Chart.js - Mixed Chart: Bar Graph with Diagonal Line
- Chart.js does not display stacked data with linear axis and fixed steps
- Multiple axis line chart with Chart.js and JSON data from Google Sheet
- line chart with {x, y} point data displays only 2 values
- Display line chart with connected dots using chartJS
- Chart.js - line chart with two yAxis: "TypeError: yScale is undefined"
- How to display Line Chart dataset point labels with Chart.js?
- How do I draw a vertical line on a horizontal bar chart with ChartJS?
- How to display inline values in a stacked bar chart with Chart.js?
- Show X axis on top and bottom in line chart rendered with Chart.js 2.4.0
- Obtain max value of y axis of line chart rendered with Chart.js
- How to display data labels outside in pie chart with lines in ionic
- Line chart with large number of labels on X axis
- Chartjs - data format for bar chart with multi-level x-axes
- How to hide the y axis and x axis line and label in my bar chart for chart.js
- Chart js: Update line chart having two data sets
- How to start the line graph from the left Y axis in a line/bar mixed chart (Chart.js)?
- Chart JS display Data Value on the top of the Bar
More Query from same tag
- Want to show the dataset labels
- How to zoom Y axis on time series or X-Y chartjs graph
- How to fix size of mixed chart with bubble chart in Chart.js?
- Chart.js will not show up second line
- Can't create separate charts using chart.js
- Charts.js (2.9.4) Gridlines not displaying under Line Graph
- Chart.js responsive css size
- Does ChartJS supports Jquery 3.4.1
- Hide chart labels
- Tiny error in the ChartJs book
- React chartjs-2 - Increase spacing between legend and chart
- what is fastest way to draw chartjs charts
- ChartJS - rolling twenty minute view
- Why is each character displayed on a new line/row?
- Hiding legend in PrimeNG
- Chartjs bar order adjustment after bar chart is drawn
- How add the sizes of the slices in the pie chart (at the top) in Chart.js?
- Data updating but chart isn't
- trouble passing API result to chart
- My pie chart (chartJs) does not appear
- Chart.js v3: how to allow tick label overflow?
- Howto draw horizontalBar with dynamic thickness (automatic rescale on browser window height resize) in Chart.js 2.9.3?
- React-Chart.js legend onClick function
- Show X axis on top and bottom in line chart rendered with Chart.js 2.4.0
- ChartJS update data with a colour
- chart.js custom legend colour based
- display various chart value and tool tip
- Rails and Chart.js
- chart.js automatic x axis distributed in time milliseconds
- How to determine chart type inside 'chart.js' pluginservice