2022-09-02 00:00:10 +00:00
|
|
|
Class {
|
|
|
|
#name : #EcEvent,
|
|
|
|
#superclass : #Object,
|
|
|
|
#instVars : [
|
|
|
|
'dates',
|
|
|
|
'color',
|
|
|
|
'type',
|
|
|
|
'name',
|
|
|
|
'label'
|
|
|
|
],
|
|
|
|
#category : #EchartsPharo
|
|
|
|
}
|
|
|
|
|
|
|
|
{ #category : #accessing }
|
2022-09-22 14:27:26 +00:00
|
|
|
EcEvent >> asEcObjectString [
|
2022-09-02 00:00:10 +00:00
|
|
|
|
2022-09-19 14:25:14 +00:00
|
|
|
^ '{ type:', '''', self type, '''', ',
|
|
|
|
name:', '''', self name, '''', ',
|
|
|
|
edgeSymbol: [', '''','none', '''',',', '''','arrow', '''', '],
|
|
|
|
coordinateSystem:', '''','calendar', '''',',
|
2022-09-02 00:00:10 +00:00
|
|
|
symbolSize: 15,
|
|
|
|
itemStyle: {
|
2022-09-19 14:25:14 +00:00
|
|
|
color:', '''','#',self color asHexString, '''',',
|
2022-09-02 00:00:10 +00:00
|
|
|
shadowBlur: 9,
|
|
|
|
shadowOffsetX: 1.5,
|
|
|
|
shadowOffsetY: 3,
|
2022-09-19 14:25:14 +00:00
|
|
|
shadowColor:', '''','#555', '''',
|
2022-09-02 00:00:10 +00:00
|
|
|
'},
|
|
|
|
data:', self datesAsString, ',
|
|
|
|
z: 3
|
|
|
|
},'
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #accessing }
|
|
|
|
EcEvent >> color [
|
|
|
|
|
|
|
|
^ color
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #accessing }
|
|
|
|
EcEvent >> color: anObject [
|
|
|
|
|
|
|
|
color := anObject
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #accessing }
|
|
|
|
EcEvent >> dates [
|
|
|
|
|
|
|
|
^ dates
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #accessing }
|
|
|
|
EcEvent >> dates: anObject [
|
|
|
|
|
|
|
|
dates := anObject
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #accessing }
|
|
|
|
EcEvent >> datesAsString [
|
|
|
|
|
|
|
|
| tempDates datesCount |
|
|
|
|
tempDates := self dates.
|
|
|
|
tempDates ifNil: [ ^ self ].
|
|
|
|
tempDates := tempDates collect: [ :each | each asDate ].
|
|
|
|
tempDates := tempDates collect: [ :date |
|
2022-09-19 14:25:14 +00:00
|
|
|
'[', '''', date asDate yyyymmdd,'''' ].
|
2022-09-02 00:00:10 +00:00
|
|
|
datesCount := OrderedCollection new.
|
|
|
|
tempDates doWithIndex: [ :date :i | datesCount add: (date, ',', (i asString), ']') ].
|
|
|
|
^ '[', (',' join: datesCount ), ']'
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #accessing }
|
|
|
|
EcEvent >> label [
|
|
|
|
|
|
|
|
^ label
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #accessing }
|
|
|
|
EcEvent >> label: anObject [
|
|
|
|
|
|
|
|
label := anObject
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #accessing }
|
|
|
|
EcEvent >> name [
|
|
|
|
|
|
|
|
^ name
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #accessing }
|
|
|
|
EcEvent >> name: anObject [
|
|
|
|
|
|
|
|
name := anObject
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #accessing }
|
|
|
|
EcEvent >> type [
|
|
|
|
|
|
|
|
^ type
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #accessing }
|
|
|
|
EcEvent >> type: anObject [
|
|
|
|
|
|
|
|
type := anObject
|
|
|
|
]
|