Comments (7)
Also is there any proper documentation for nameLabelFormat
? I feel like this may be a viable solution however all I can find is that nameLabelFormat
accepts a string[]
from britecharts-react.
Hi @aishmitk, thanks for creating this issue!
I see the y-axis offset, it feels weird. I would tweak it with CSS as you mention. If you post it as a Codepen I could help you more (You can jumpstart it from this one).
Regarding the x-ticks, you could try to specify a number with xTicks
(http://eventbrite.github.io/britecharts/module-Stacked-bar.html#.xTicks__anchor). You could also try to tilt the values with CSS.
Oops, it seems there is an issue with nameLabelFormat, as it is not being used at the moment. I will create an issue to investigate further.
Thanks!
from britecharts-react.
The problem with the xTicks prop is that as it is explained in the D3 docs is a mere suggestion and in most cases doesn't have any real effect on the number of ticks displayed, specially with high number of datasets.
The specified count is only a hint; the scale may return more or fewer values depending on the domain.
Source: D3 scale.ticks
from britecharts-react.
This is probably a really elementary question. But how do you apply CSS to the graph? The graph is rendered to a SVG element. I am trying to left align axis tick labels (more specifically x-axis on horizontal bar graph)
I see the y-axis offset, it feels weird. I would tweak it with CSS as you mention. If you post it as a Codepen I could help you more (You can jumpstart it from this one).
Regarding the x-ticks, you could try to specify a number with
xTicks
(http://eventbrite.github.io/britecharts/module-Stacked-bar.html#.xTicks__anchor). You could also try to tilt the values with CSS.
from britecharts-react.
Hi @jjphung, sorry for the delay!
In order to apply that CSS styling, you would do something like this:
.x.axis .tick .text {
transform: rotate(-45deg);
}
And probably adjust the x axis position:
.x.axis {
transform: translateY(420px);
}
(Assuming the original translation was 400px, that could be different in your case)
from britecharts-react.
@Golodhros Thank you so much! I was trying to apply CSS properties through stuff like: "text-align: left". I didn't notice the text transform properties being applied to the classes. Adjusting the text transform and text-anchor properties did the trick!
And probably adjust the x axis position:
.x.axis { transform: translateY(420px); }
(Assuming the original translation was 400px, that could be different in your case)
from britecharts-react.
Closing due to lack of activity.
from britecharts-react.
Related Issues (20)
- Cant set tooltip title to empty string HOT 2
- Bar Chart Y-axis name value getting truncated to '...' HOT 14
- StackedArea chart doesn't render correctly HOT 2
- Support TypeScript HOT 16
- Add customMouseMove and customClick to Donut chart
- Importing withResponsiveness() helper HOT 7
- Update project's documentation HOT 5
- Update Node HOT 3
- Tooltip with StackedBar not being rendered HOT 10
- Parse error when when generating chart boilerplate via plop HOT 2
- highlightSliceById prop of Donut component is not working
- Chart does not render with Tooltip when data is progressively added HOT 4
- Feature Proposal HOT 7
- Support Locale in Bar Chart HOT 1
- Broken and unclear documentation HOT 10
- customClick method is not working HOT 3
- Move implementation into Hooks HOT 1
- Move into TypeScript HOT 1
- How to change the font-size for the x- and y-axes? HOT 3
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 britecharts-react.