Comments (4)
@michkami
When there're 2 or more values aligned to single axis(y or y2), the domain range will set according it.
Let's say, given values are 300 and 500, in this case, min=300 and max=500.
But when single value (ex. 500) is given, can't determine min/max, because there's no data to determine or compare.
So, in this case min will be set as 0 and max 500.
https://github.com/naver/billboard.js/blob/master/src/ChartInternal/internals/domain.ts#L136
from billboard.js.
@michkami When there're 2 or more values aligned to single axis(y or y2), the domain range will set according it.
Let's say, given values are 300 and 500, in this case, min=300 and max=500. But when single value (ex. 500) is given, can't determine min/max, because there's no data to determine or compare.
So, in this case min will be set as 0 and max 500. https://github.com/naver/billboard.js/blob/master/src/ChartInternal/internals/domain.ts#L136
I see, this makes sense.
Maybe not completely connected to the question above, but I found this line here
which cancels the zerobased setting when y min or max is set. But in case ofy.min: 0
or y.max: 0
I would still expect the zerobased option put the zero on the x axis level.
Do you see any reason to not add an exception for the 0 values here?
In this case I would expect the zerobased option to still be working:
https://jsfiddle.net/michkami/6vr1z20f/
from billboard.js.
Do you see any reason to not add an exception for the 0 values here?
The conditional stayed from the start of the project and maintained as, mainly to not break any possible issue.
https://github.com/naver/billboard.js/blob/1.0.0/src/internals/domain.js#L156
from billboard.js.
The conditional stayed from the start of the project and maintained as, mainly to not break any possible issue. https://github.com/naver/billboard.js/blob/1.0.0/src/internals/domain.js#L156
Yes, I saw this. My question was if there it would be possible to add 0 as an exception here in case zerobased
is true, so that the y axis will start on the x axis level when min is set to 0.
The current behaviour is what i would only expect if I set zerobased: false
and then set the min value to 0.
If zerobased: true
and I set the y axis min to 0, I would expect for it to start at the same level as the x axis.
I played around and saw, that if i pass null
to y axis min, it would in this case work as expected, but the types only accept number | undefined
.
from billboard.js.
Related Issues (20)
- Inconsistence in tooltip y coordinate in gauge with arc.rangeText + title.text
- Replace karma due to the deprecation
- Is there any way to create two combined charts which share a single x-axis? HOT 1
- About domain in `clip-path` HOT 1
- x-axis label overlapped by tick text HOT 1
- option for rotating axis labels
- `arc.needle.value` is missing from typings HOT 1
- "boost.useWorker: true" in combination with frequent updates results in a consistent tab crash HOT 3
- Adopt eslint v9
- Implement regions.label to .region() API HOT 1
- Add regions.label type definition
- Scatter Plot points not displaying when loaded into chart in some cases HOT 1
- Chart data update with overriden transition duration freezes app
- Implement option to force event to work multiple xs type work as single x
- nullish element is passed for treemap data.onover/out callback function
- Extent seems to have no effect on timeseries chart
- Treemap error while building chart HOT 1
- polar type is missing
- Incorrect rendering funnel with padding options
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 billboard.js.