Comments (11)
add font name in propsForLabels this works for me
chartConfig={{
propsForLabels:{
fontFamily:'MontserratBold',
},
...
}}
from react-native-chart-kit.
You can add fontFamily property to Text into react-native-chart-kit.
for example : in pie-chart.js - line 47 add this code:
fontFamily={c.item.fontFamily}
Now you can set fontFamily in your data entities.
but react-native-svg can't render all font type!
from react-native-chart-kit.
Just found out by accident while reading someone else code:
Under chartConfig prop, there is the propsForLabels prop. You may enter the fontFamily
there and other texts properties.
from react-native-chart-kit.
@c0mm4nDer worked like a charm. Thanks a lot!
from react-native-chart-kit.
Should we create a PR for this?
from react-native-chart-kit.
Any update?
from react-native-chart-kit.
add font name in propsForLabels this works for me
chartConfig={{ propsForLabels:{ fontFamily:'MontserratBold', }, ... }}
Thanks, it worked for me :)
from react-native-chart-kit.
inside data object
{
legendFontColor: colors.white,
legendFontSize: 8,
}
from react-native-chart-kit.
{ legendFontColor: colors.white, legendFontSize: 8, }
@3abdawy Where we can put this?
from react-native-chart-kit.
It pretty easy you can add ### propsForLabels to the config props
<BarChart
chartConfig={{
...chartConfig,
propsForLabels: {
fontSize:12,
fontFamily: "roboto-regular",
}
}}
/>
from react-native-chart-kit.
propsForLabels:{fontFamily :'iransans'},
this work just fine
from react-native-chart-kit.
Related Issues (20)
- How to change inner dash line color
- Line chart full width HOT 1
- How to hide/move down the legend from PieChart HOT 1
- Is there any way to make line transparent for a particular data? HOT 1
- Vertical X-axis label in two lines
- Bar Chart VerticalLines not rendered.
- How to get Image (svg or png) of chart?
- Cannot change fillShadow on ProgressChart HOT 1
- How to show 6 labels in Y-axis in Line-chart HOT 1
- How to get the real width of the line chart?
- I have an issue with the Linechart. Dashed/Dotted lines in the beginning.
- Bar Chart Y axis Space on left issue
- yAxisInterval is not working
- Format Top of bars
- New Features: Adding Axis Labels
- Line Chart data does not extend to full width of graph HOT 1
- LineChart gradient-based stroke
- Bar chart color opacity
- It's a feature request to add the prop for custom style for Pie chart legend.
- Multiple datasets in Line Chart with `withScrollableDot` value is shown only for one line 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 react-native-chart-kit.