Comments (3)
Based on the documentation, you are looking for something like this:
{
type: 'bar',
data: {
datasets: [{
backgroundColor: 'green',
data: [50]
}, {
backgroundColor: 'yellow',
data: [100]
}, {
backgroundColor: 'orange',
data: [150]
}, {
backgroundColor: 'red',
data: [200]
}]
},
options: {
scales: {
xAxes: [{display: false}],
yAxes: [{display: false}]
},
legend: {display: false}
}
}
from quickchart.
Does quickchart.io not support the 'indexable' attribute of some of these Chart.js options? We should be able to specify the colors in an array within the dataset, instead of separate datasets.
https://www.chartjs.org/docs/latest/general/options.html#indexable-options
https://www.chartjs.org/docs/latest/charts/bar.html#dataset-properties
When I tried this, it didn't work as expected:
{
type: 'bar',
data: {
datasets: [{
backgroundColor: ['green','yellow','orange','red'],
data: [50,100,150,200]
}]
},
options: {
scales: {
xAxes: [{display: false}],
yAxes: [{display: false}]
},
legend: {display: false}
}
}
But maybe I got something wrong...
from quickchart.
Got it to work. You HAVE to put in empty labels for some reason:
from quickchart.
Related Issues (20)
- Error in tickFormat - suffix in pie type chart HOT 5
- [BUG] EXPRESS_JSON_LIMIT env variable does not work.
- getGradientFillHelper() results in black background HOT 3
- Financial Charts
- CI feature: integrate pull request preview environments
- Cannot POST /graphviz
- How to install quickchart locally HOT 1
- Failed to run on GCP HOT 1
- Unable to install this on Ubuntu 23.04 nodeJS 18 LTS
- Unable to change scale using min/max in options HOT 1
- FEATURE Request: Export To PDF
- linear regression
- Support for datalabels in v3+ charts? HOT 4
- Transparant table background HOT 1
- tickFormat not working in self-hosted instance
- JSON Integration? HOT 1
- de-facto quickchart docker image ianw/quickchart appears abandoned HOT 1
- Unique tags for inline SVG HOT 2
- Adding Elestio as deployment option
- Docker image randomly stopped working
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 quickchart.