Refactoring calendar and event calendar for echarts objects strings and improving sunburst segment for echarts format.
This commit is contained in:
parent
2bb7cf53ab
commit
00aa287d17
@ -45,7 +45,7 @@ EcCalendar >> asEcScript [
|
|||||||
'},
|
'},
|
||||||
|
|
||||||
series: [', Character cr asString,
|
series: [', Character cr asString,
|
||||||
self eventsAsStringSnippets,
|
self eventsAsEcObjectsString,
|
||||||
']
|
']
|
||||||
};
|
};
|
||||||
myCalendar.setOption(option);'
|
myCalendar.setOption(option);'
|
||||||
@ -102,12 +102,12 @@ EcCalendar >> events [
|
|||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
EcCalendar >> eventsAsStringSnippets [
|
EcCalendar >> eventsAsEcObjectsString [
|
||||||
|
|
||||||
| tempEvents |
|
| tempEvents |
|
||||||
tempEvents := self events.
|
tempEvents := self events.
|
||||||
tempEvents ifNil: [ ^ self ].
|
tempEvents ifNil: [ ^ self ].
|
||||||
^ Character cr join: (tempEvents collect: [ :each | each asStringSnippet ])
|
^ Character cr join: (tempEvents collect: [ :each | each asEcObjectString ])
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
|
@ -12,7 +12,7 @@ Class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
EcEvent >> asStringSnippet [
|
EcEvent >> asEcObjectString [
|
||||||
|
|
||||||
^ '{ type:', '''', self type, '''', ',
|
^ '{ type:', '''', self type, '''', ',
|
||||||
name:', '''', self name, '''', ',
|
name:', '''', self name, '''', ',
|
||||||
|
@ -33,12 +33,24 @@ EcSunburstSegment class >> rootName: aString [
|
|||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
EcSunburstSegment >> asEcObjectString [
|
EcSunburstSegment >> asEcObjectString [
|
||||||
|
|
||||||
|
self isRoot
|
||||||
|
ifFalse: [
|
||||||
^ '{ name: ', name, ',
|
^ '{ name: ', name, ',
|
||||||
value: ', value asString, ',
|
value: ', value asString, ',
|
||||||
color: ', '''', color asHTMLColor, '''', ',
|
color: ', '''', (color ifNil: [ '' ] ifNotNil: [ color asHTMLColor ]), '''', ',
|
||||||
children: []', Character cr asString,
|
children: [',
|
||||||
|
']',
|
||||||
|
Character cr asString,
|
||||||
'}'
|
'}'
|
||||||
]
|
]
|
||||||
|
ifTrue: [
|
||||||
|
^ '{ name: ', name, ',
|
||||||
|
color: ', '''', (color ifNil: [ '' ] ifNotNil: [ color asHTMLColor ]), '''', ',
|
||||||
|
children: []',
|
||||||
|
Character cr asString,
|
||||||
|
'}'
|
||||||
|
]
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
EcSunburstSegment >> children [
|
EcSunburstSegment >> children [
|
||||||
|
Loading…
Reference in New Issue
Block a user