107 lines
1.7 KiB
Smalltalk
107 lines
1.7 KiB
Smalltalk
Class {
|
|
#name : #EcEvent,
|
|
#superclass : #Object,
|
|
#instVars : [
|
|
'dates',
|
|
'color',
|
|
'type',
|
|
'name',
|
|
'label'
|
|
],
|
|
#category : #EchartsPharo
|
|
}
|
|
|
|
{ #category : #accessing }
|
|
EcEvent >> asStringSnippet [
|
|
|
|
^ '{ type:', '''', self type, '''', ',
|
|
name:', '''', self name, '''', ',
|
|
edgeSymbol: [', '''','none', '''',',', '''','arrow', '''', '],
|
|
coordinateSystem:', '''','calendar', '''',',
|
|
symbolSize: 15,
|
|
itemStyle: {
|
|
color:', '''','#',self color asHexString, '''',',
|
|
shadowBlur: 9,
|
|
shadowOffsetX: 1.5,
|
|
shadowOffsetY: 3,
|
|
shadowColor:', '''','#555', '''',
|
|
'},
|
|
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 |
|
|
'[', '''', date asDate yyyymmdd,'''' ].
|
|
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
|
|
]
|