Comments (4)
well, I think this issue isn't really attached on chart functionality.
To make as you want, there're a lot of approaches to make it.
Just one of the way will be defining viewBox
attribute to the svg element to crop the viewport.
I'm not give example with your code for the complexity.
bb.generate({
data: {
columns: [
["data1", 5, 10, 15],
["data2", 20, 3, 8]
],
type: "bar"
},
axis: {
x: {
show: false
},
y: {
show: false
}
},
legend: {
show: false
}
});
// to get the chart area size
var rect = d3.select(".bb-zoom-rect");
// set viewBox attribute
d3.select("#chart svg").attr("viewBox", [
0,0,rect.attr("width"), rect.attr("height")
].join(" "))
This example will make chart element to fit on exact svg viewport.
from billboard.js.
Good point!
Even though you set not showing, the corresponding node for axis still remains.
If you need to get rid axis nodes, just simply remove nodes
// in case of x axis
d3.selectAll(".bb-axis.bb-axis-x").remove();
// in case of y axis
d3.selectAll(".bb-axis.bb-axis-y").remove();
I'll take considering this issue if can be more nice way to implement. Thanks anyway.
from billboard.js.
Thanks for your answer.
Obviously, the axis does hide when I remove the axis as like your answer.
The thing is ... The white space still remains.
I couldn't manage to draw a chart without these white space.
I'd like to place the chart right above the bottom line, like below.
Could you give me a tip for a solution, please ?
from billboard.js.
Thank you for giving me a solution. It's been very helpful.
from billboard.js.
Related Issues (20)
- 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
- Regions are poorly rendered HOT 1
- Remove unused wheel listener HOT 1
- dragging touch event not working on Android's chrome
- Add prevention to handle control/extended ascii characters for data names HOT 1
- Enhance bar.width callback
- Reinforce bar.width.ratio description
- Charts' mouseover tooltips are not shown when using a mouse on a touchscreen laptop HOT 3
- Issue with region dasharray HOT 1
- Treemap tooltip not shown in latest Chrome and Firefox HOT 5
- Treemap tooltip bad position on mobile 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 billboard.js.