Comments (1)
When I started developing Charts.CSS I tested all the available methods. There where several use cases where data-*
attributes had less flexibility. That is why I decided to use CSS variables.
In your example, the --size
calculation is attr("data-value") / attr("data-total")
, this is not always the default size.
When you prefer to display stacked chart, you need to change the "total" value. Read the stacked docs, and see the examples on the Simple vs. Percentage section.
In addition, when using CSS variables, you can use math functions everywhere. With data attributes you have to use static value. You can't use calculations like data-total="calc( 2 + 3 + 4 )"
from charts.css.
Related Issues (20)
- v1.0.1 seems not compatible with 0.9.0 HOT 4
- Hxyv
- Translated into Chinese HOT 3
- Waterfall charts HOT 1
- Remove old vendor prefixes
- Improvement: replace flex with grid HOT 1
- A charts.css binding for Python is available HOT 4
- Is v1.0 going to be released anytime soon? HOT 2
- Line chart shows full line at size: 0 and no line at size: 1. I would suggest showing half the line in both situations
- after ten elements in legend, colors don't repeat
- Overlapping Bar and Column Chart HOT 1
- Grouped stacked columns
- What are the hurdles to getting pie charts added? HOT 5
- Is there a way to make line thickness uniform for line charts? HOT 5
- Line gets clipped in line chart when value is 100% HOT 4
- Scatterplots HOT 1
- Table Data Cells <td> interfering with responsive Table <table> elements (Safari v15 MacOS)
- Absence of percentage label in pie charts
- Which browsers are supported? HOT 1
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 charts.css.