Comments (5)
Have you looked at the examples? Need more information of whats not working.
Can you create a jsfiddle that I can look at?
from chartjs-plugin-trendline.
I'm getting the same issue while using Chartisan. I'm getting no errors in the console, I'm importing the plugin via the cdn. Here's the code.
const chartisan = new Chartisan({
el: `#chart${id}`,
data: chart,
hooks: new ChartisanHooks()
.legend(true)
.colors(colorarray)
.datasets(objectarray)
.padding({
left: 0,
right: 0,
bottom: 0,
top: 20,
})
.options({
options: {
// animation,
maintainAspectRatio: false,
plugins: {
datalabels: {
anchor: 'center',
clamp: true,
align: 'top',
color: () => {
if (type === 'bar'){
return 'white'
} else {
return '#5D2A42'
}
},
},
tooltip: {
enabled: false,
},
legend: {
position: 'bottom',
fullSize: true,
labels: {
boxHeight: 5,
textAlign: 'left',
usePointStyle: true,
// This more specific font property overrides the global property
font: {
size: 15,
family: 'Roboto',
weight: 'thin',
}
}
}
},
scales: {
x: {
grid: {
color: 'white',
borderWidth: 2,
tickWidth: 2,
tickLength: 8,
offset: false,
borderColor: `rgba(93, 42, 66, ${borderopacity})`,
tickColor: '#FFFFFF',
},
type: 'time',
time: {
unit: 'day'
},
},
y: {
beginAtZero: () => {
if (type == 'bar') {
return true
}
return false
},
grid: {
color: 'white',
borderWidth: 2,
tickWidth: 2,
tickLength: 8,
offset: false,
borderColor: `rgba(93, 42, 66, ${borderopacity})`,
tickColor: '#FFFFFF',
},
ticks: {
// Include a unit in the ticks
callback: function(value, index, values) {
return value + unit;
}
},
}
}
}
})
})
from chartjs-plugin-trendline.
@Sjos12 - I had the same issue...try commenting out type: time
. for some reason trendline can't handle that type.
@Makanz are you aware of this issue?
from chartjs-plugin-trendline.
I have never used Chartisan so I can unfortunately not help you with that.
from chartjs-plugin-trendline.
@bbohling encountering the same issue you had but we weren't able to remove type: time
yet, did you come up with a solution that could work with type: time
?
from chartjs-plugin-trendline.
Related Issues (20)
- Cannot read property 'register' of undefined HOT 6
- Adding gradient information for the trendline HOT 2
- Compatible with ChartJS 3.6? HOT 2
- TrendLine overlaps Tooltip + Solution. Issue = afterDraw() HOT 1
- Angular 12.2 |
- 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
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.