2022-09-19 15:11:10 +00:00
|
|
|
Class {
|
|
|
|
#name : #EcSunburst,
|
|
|
|
#superclass : #Object,
|
|
|
|
#instVars : [
|
|
|
|
'segments'
|
|
|
|
],
|
|
|
|
#category : #'EchartsPharo-EchartsPharo'
|
|
|
|
}
|
|
|
|
|
2022-09-22 14:07:56 +00:00
|
|
|
{ #category : #accessing }
|
|
|
|
EcSunburst >> asEcScript [
|
|
|
|
|
|
|
|
^ 'var mySunburst = echarts.init(document.getElementById(','''', 'sunburst', '''', '));',
|
|
|
|
Character cr asString,
|
|
|
|
|
|
|
|
'var data = [',
|
|
|
|
|
|
|
|
']',
|
|
|
|
|
|
|
|
Character cr asString,
|
|
|
|
'var option = {
|
|
|
|
series: {
|
|
|
|
type:', '''', 'sunburst', '''', ',
|
|
|
|
data: data,
|
|
|
|
radius: [0, ', '''', '90%', '''', '],
|
|
|
|
label: {
|
|
|
|
rotate:', '''', 'tangential', '''', ',
|
|
|
|
fontSize: 15,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
mySunburst.setOption(option);'
|
|
|
|
]
|
|
|
|
|
2022-09-19 15:11:10 +00:00
|
|
|
{ #category : #accessing }
|
2022-09-21 22:15:28 +00:00
|
|
|
EcSunburst >> segments [
|
|
|
|
|
|
|
|
^ segments ifNil: [ segments := OrderedCollection new ].
|
2022-09-19 15:11:10 +00:00
|
|
|
]
|