Comments (6)
+1
from chartjs-plugin-trendline.
Sorry for my late reply.
I hope this example code will help you.
new Chart(document.getElementById("bar-chart"), {
type: 'bar',
data: {
labels: ["Label 1", "Label 2", "Label 3", "Label 4", "Label 5"],
datasets: [
{
label: "Population",
backgroundColor: ["#3e95cd", "#8e5ea2","#3cba9f","#e8c3b9","#c45850"],
data: [2478,5267,734,784,433],
trendlineLinear: {
style: "rgba(255,105,180, .8)",
lineStyle: "dotted",
width: 2
}
}
]
},
options: {
legend: { display: false },
title: {
display: true,
text: 'Chart header'
}
}
});
from chartjs-plugin-trendline.
Does this work in angular 6 as well?
from chartjs-plugin-trendline.
Does this work in scatter charts?
from chartjs-plugin-trendline.
Does this work in scatter charts?
yes. Check this chart : https://www.chartjs.org/samples/latest/charts/scatter/basic.html
from chartjs-plugin-trendline.
I've also noticed that it does not work while defining more than one y scale (as in the reported description)
By sharing a single Y scale among lines, the plugin does not raise any exception.
You may also fix it is by replacing the
"id: 'satisfaction',"
by
"id: "y-axis-0"
which is hardcoded defined by chartjs-plugin-trendline plugin
from chartjs-plugin-trendline.
Related Issues (20)
- Angular 12.1.2 | Typescript error while importing chartjs-plugin-trendline HOT 7
- Simple Gradient Line HOT 2
- New error: Failed to execute 'createLinearGradient' HOT 2
- Is data structure only support number array? HOT 1
- Not working with chart.js Version 4.x HOT 4
- Bug: Trendline is broken when data is an object HOT 4
- arithmetic moving average is not working HOT 1
- Bug in 2.0.3: Error when first data point is 0, "The provided double value is non-finite" HOT 1
- trendline does not support time scale? HOT 9
- trendline does not support different line style? HOT 4
- Add label to trendline HOT 1
- Error when there is less than two non-null values HOT 1
- console.log('forEach') HOT 1
- Feature request: trendoffset or trendrange HOT 1
- Include Trendline in legend
- can't load directly in browser version 2.2.1 with chartjs 4.4.3 HOT 4
- Can't load version 2.1.1: Module has no exports HOT 5
- Issue with Vite and Docker HOT 5
- Mysterious "not a finite floating-point value" error HOT 2
- Trendline not showing when using Chart.js Object Data Structure v2.1.2 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chartjs-plugin-trendline.