Comments (15)
Hi,
The first issue is a bug. I'll fix to have correct width and position.
And the second is not a bug. Currently bars will be stacked according to the order of data, not of the values. However, I think the order should be configurable, so I'll add some option or api.
from c3.
I fixed the first issue.
from c3.
could you update the JSON file for the version?
from c3.
Yes, I updated.
from c3.
first issue confirmed fix, great work!
from c3.
Hi,
I added data.order
option. This option can be used to change the order of stacking of bars.
I think you can do what you wrote above by setting this option 'desc'
.
If you set 'desc'
, bars will be stacked from one that has minimum sum of its values.
Here is sample - http://c3js.org/samples/data_order.html
Could you try this?
from c3.
Thats perfect,
Thanks Masayuki!
from c3.
Think I have discovered an issue with the same values?
As you can see, it adds it to the to if it is the same, making it an incorrect measurement against the Y axis
from c3.
Perhaps it may be a better to split the bars in two and place them next to each other if they have the same values in the stack?
from c3.
The image above also shows that two data sources have been assigned the same colour!
from c3.
Hi,
You mean the order in chart and the order in tooltip is different?
And I think It may be better not to split bars because height will not show the sum of values and so it's not natural as stacked bar chart I think.
About color, c3 gives 10 colors to each data as default (it's d3.scale.category10()
). If the number of data is over 10 and same color should be avoided, color.patterns
should be used, like:
color.patterns = ['#333', #'999', ...]
from c3.
awesome, thanks
from c3.
A colour example on c3 would be cool btw!
from c3.
Believe it may be:
color: {
pattern: ['#111', '#222', '#333', '#D35400'...]
},
from c3.
Hi, I added a sample for color.pattern
option - http://c3js.org/samples/options_color.html
Could you try this?
Thank you.
from c3.
Related Issues (20)
- How to change the c3 bar chart x axis label color?
- How can I change multiline for c3js bar chart x axis tick text
- Proper y/y2 axis ticks as per the given tick count
- Setting data.names with object's properties
- There is probably a better performing way for point show false
- Missing column in bar chart derived from data.json where the x value is 'empty'
- TypeError: 'undefined' is not an object (evaluating 'e.schemeCategory10') HOT 2
- data.color function based on d.value does not change chart color
- Insecure Randomness for the useof Math.random() in redrawBarForSubchart, redrawLineForSubchart and redrawAreaForSubchart(security vulnerability) HOT 2
- Cannot read properties of undefined (reading 'schemeCategory10') HOT 1
- Problem with rendering dates
- 2023: Uncaught TypeError: d3.mouse is not a function
- Keyboard accessibility for legends and and tooltips
- D3 5.16.0: data.labels.format regression
- d3-color version 1.4.1 vulnerability dependent with c3 latest version
- bar chart animation and transition problem
- Issue in angular 17 I use c3 graphs which is making whe site freeze and getting blanket page for some seconds
- Pie charts and graphs are not accessible with keyboard.
- Add Repobeats (metrics) to README
- Labels are getting cut-off in the time-series line chart
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 c3.