score:11
Accepted answer
you need to set fill
property to false
for the first dataset (the red one), to make it transparent.
datasets: [{
label: "consumption",
fill: false,
pointradius: 0,
bordercolor: "#0000ff",
backgroundcolor: "rgba(255,10,13,255)",
...
or, you can also reduce the opacity of background color, like so ...
backgroundcolor: "rgba(255, 10, 13, 0.1)"
here is the working codepen
Source: stackoverflow.com
Related Query
- Draw two plots using chartjs over one another with transparency
- Draw stacked horizontal bar chart with Average line using ChartJS
- How to display a progress over time in one horizontally stacked bar with chartjs
- How do I draw horizontal bars with a label using either ChartJS or D3?
- ChartJS - Draw chart with label by month, data by day
- Display line chart with connected dots using chartJS
- Chartjs linechart with only one point - how to center
- Is it possible to combine two Y axes into a single tooltip with ChartJS 2?
- Chartjs hovering over one Chart, shows tooltip across all charts
- How to work out Chartjs using TypeScript with Chartjs.definitelyTyped from github
- Want to draw data using chartjs in django
- Chart.js two Y-Axis, one with negative values
- Multipe doughnut charts on one page with text in center using Chart.js
- how to draw line graph with line animation from left to right using chartjs?
- Adding line over stacked line chart with ChartJS
- ChartJS / Chartjs-plugin-annotation How to draw multiple vertical lines using an array?
- Using ChartJs with MVC 5 Razor
- Chartjs not working with d3 from csv source
- ChartJS datasets with one data value
- How to display chart using Chartjs with JSON data in Laravel
- Using zoom/pan with ChartJS
- Is there a way in chartjs to display different Boolean values with an offset in Y over a common timeline?
- How to draw a range label on x axis using chartJS
- Using CHARTJS with a JavaScript Array
- Can't Draw Horizontal Line on Graph Using ChartJS Annotation Plugin and Primevue Chart
- Real-time line chart with ChartJS using Ajax data
- How do I display two datasets on a single chart with chartjs
- Updating Chartjs to 2.5 with custom code
- ChartJS remove vertical grid lines one on two
- Using Datalabels and ChartJS with Chartjs-node-canvas
More Query from same tag
- nodejs express jade mongodb project: how to import include chart.js
- Pie Chart Label is not visible in ReactJS
- Chart.JS using Angular.JS on JSFiddle
- react-chartjs-2 keep x axis always 0% to 100%
- Limit Label test
- I am getting an issue my chart using chart.js is not appering until i tap 3 time on label button
- Multiple line types in ChartJS
- How to display small numbers in chart js tooltip?
- How to hide tooltips with their respective dataset
- How change chart height in chart.js
- How do I fetch data from 2 tables and display into 1 chartjs
- How to show slice value inside of slice in pie chart using chart.js
- Change color of a single point by clicking on it - Chart.JS
- Implementing range slider in Chart.js
- chartjs how to change decimal to integers X-axis
- Updating Chart Data on Charts.js with Ng2-Charts
- angular-chart.js - chart height not working on iOS but works fine on Android and Web
- Horizontal Bar-Chart - angular-chart.js
- ChartJS 'Hello World' not animating
- Chart.js disappears on Android
- How to bind data from Controler to chartjs line chart to create it as dynamic?
- chart.js label color change based on value
- Chart doesn't display fonts
- Chart,js Pie Chart can the gap between a pie chart and the legend be adjusted
- Chart.js 3+, Firefox 68 and Angular: "ReferenceError: "ResizeObserver is not defined"
- Problem adding name to X-axis for a chart
- Ng2-charts + How to customize the position of X axis labels?
- Barchart reducing space between bars
- Change tooltip positioning in doughnut chart using Chart.js
- Chart.js two categorical scales