susiwen8 commented on code in PR #18240: URL: https://github.com/apache/echarts/pull/18240#discussion_r1114363380
##########
test/sunburst-label.html:
##########
@@ -112,6 +114,120 @@
});
</script>
+ <script>
+ require([
+ 'echarts',
+ // 'map/js/china',
+ // './data/nutrients.json'
+ ], function (echarts) {
+ var chart = echarts.init(document.getElementById('main1'));
+
+ var data = [
+ {
+ name: 'Grandpa',
+ children: [
+ {
+ name: 'Uncle Leo',
+ value: 15,
+ children: [
+ {
+ name: 'Cousin Jack',
+ value: 2
+ },
+ {
+ name: 'Cousin Mary',
+ value: 5,
+ children: [
+ {
+ name: 'Jackson',
+ value: 2
+ }
+ ]
+ },
+ {
+ name: 'Cousin Ben',
+ value: 4
+ }
+ ]
+ },
+ {
+ name: 'Father',
+ value: 10,
+ children: [
+ {
+ name: 'Me',
+ value: 5
+ },
+ {
+ name: 'Brother Peter',
+ value: 1
+ }
+ ]
+ }
+ ]
+ },
+ {
+ name: 'Nancy',
+ children: [
+ {
+ name: 'Uncle Nike',
+ children: [
+ {
+ name: 'Cousin Betty',
+ value: 1
+ },
+ {
+ name: 'Cousin Jenny',
+ value: 2
+ }
+ ]
+ }
+ ]
+ }
+
+ ];
+ option = {
+ series: {
+ type: 'sunburst',
+ startAngle: 0,
+ // emphasis: {
+ // focus: 'ancestor'
+ // },
+ data: data,
+ radius: [0, '90%'],
+ label: {
+ rotate: 'radial'
+ }
+ }
+ };
+ var chart = testHelper.create(echarts, 'main1', {
+ title: [
+ 'Label rotation under different startAngle '
+ ],
+ option: option,
+ height: 600,
+ // buttons: [{text: 'btn-txt', onclick: function () {}}],
+ // recordCanvas: true,
+ });
+
+ var config = {
+ startAngle: 0
+ };
+
+ function update() {
+ chart.setOption({
+ series: [{
+ startAngle: config.startAngle
+ }]
+ });
+ }
+
+ var gui = new dat.GUI();
+ gui.add(config, 'startAngle', 0, 360)
Review Comment:
`clockwise` has added
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
