8000 minor revisions · plotly/documentation@1f4a05d · GitHub
[go: up one dir, main page]

Skip to content

Commit 1f4a05d

Browse files
author
mahdis-z
committed
minor revisions
1 parent f0c63c8 commit 1f4a05d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

_posts/plotly_js/basic/sunburst/2020-01-14-inside-text-orientation.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
sitemap: false
77
arrangement: horizontal
88
markdown_content: |
9-
The [insidetextorientation](https://plot.ly/javascript/reference/#sunburst-insidetextorientation) attribute controls the orientation of the texts inside slices. With 'auto' the texts may automatically be rotated to fit with the maximum size inside the slice. The other three options 'horizontal', 'radial', and 'tangential' forces text to be horizontal, radial, and tangential.
9+
The [insidetextorientation](https://plot.ly/javascript/reference/#sunburst-insidetextorientation) attribute controls the orientation of the texts inside chart sectors. When set to 'auto' the texts may automatically be rotated to fit with the maximum size inside a sector. The other three options 'horizontal', 'radial', and 'tangential' first try to orient text at the 3:00, 6:00, 9:00, and 12:00 hours. If there is no enough room, then the text would be positioned in the middle of the arc.
1010
---
1111
Plotly.d3.csv('https://raw.githubusercontent.com/plotly/datasets/master/coffee-flavors.csv', function(err, rows){
1212
function unpack(rows, key) {
13-
return rows.map(function(row) {return row[key]});
13+
return rows.map(function(row) {return row[key]})
1414
}
1515

1616
var data = [{
@@ -19,9 +19,11 @@
1919
ids: unpack(rows, 'ids'),
2020
labels: unpack(rows, 'labels'),
2121
parents: unpack(rows, 'parents'),
22-
insidetextorientation: 'radial'}];
22+
textposition: 'inside',
23+
insidetextorientation: 'radial'
24+
}]
2325

24-
var layout = {margin: {l: 0, r: 0, b: 0, t:0}};
26+
var layout = {margin: {l: 0, r: 0, b: 0, t:0}}
2527

2628
Plotly.newPlot('myDiv', data, layout)
2729
})

0 commit comments

Comments
 (0)
0