This repository was archived by the owner on Sep 17, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,8 @@ export default class BarChart extends Component {
51
51
fontFamily : 'Arial' ,
52
52
fontSize : 14 ,
53
53
bold : true ,
54
- color : '#34495E'
54
+ color : '#34495E' ,
55
+ rotate : 45 ,
55
56
}
56
57
} ,
57
58
axisY : {
@@ -134,7 +135,7 @@ export default class BarChart extends Component {
134
135
{ options . axisX . showLabels ?
135
136
< Text fontFamily = { textStyle . fontFamily }
136
137
fontSize = { textStyle . fontSize } fontWeight = { textStyle . fontWeight } fontStyle = { textStyle . fontStyle }
137
- fill = { textStyle . fill } x = { c . line . centroid [ 0 ] } y = { labelOffset + chartArea . y . min } rotate = { 45 } textAnchor = "middle" >
138
+ fill = { textStyle . fill } x = { c . line . centroid [ 0 ] } y = { labelOffset + chartArea . y . min } rotate = { textStyle . rotate } textAnchor = "middle" >
138
139
{ c . item . name }
139
140
</ Text >
140
141
: null }
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ export const fontAdapt = (fontProps) => {
45
45
return {
46
46
fontFamily : fontProps . fontFamily ,
47
47
fontSize : fontProps . fontSize ,
48
+ rotate : fontProps . rotate || 0 ,
48
49
fontWeight : fontProps . fontWeight ? 'bold' : 'normal' ,
49
50
fontStyle : fontProps . fontStyle ? 'italic' : 'normal' ,
50
51
fill : fill
You can’t perform that action at this time.
0 commit comments