DuneSt / ChartJs

This is a Seaside binding for ChartJS
MIT License
7 stars 3 forks source link

Chart js2.8 #15

Open mahugnon opened 4 years ago

mahugnon commented 4 years ago

We propose an update of ChartJs to 2.8 version of ChartJS

jecisc commented 4 years ago

I opened the demo and saw some problems:

This need to be addressed before we review the model.

mahugnon commented 4 years ago

Yes, you're right Cyril. It has to be improved. We just worked on 2D plots and little bit 1D plots

mahugnon commented 4 years ago

ChartJs 2.8 does not support BoxPlot directly

jecisc commented 4 years ago

I tried the demo and now it does not open anymore.

Here is the error I get:

UndefinedObject>>doesNotUnderstand: #new
ChartData>>resetBackgroundwithDataSize
[ :jsonMapWriter | 
jsonMapWriter writeKey: #labels value: (xObjects collect: [ :aXObject | self labelFor: aXObject ]).
jsonMapWriter writeKey: #datasets value: self resetBackgroundwithDataSize ] in ChartData>>neoJsonOn: in Block: [ :jsonMapWriter | ...
[ block value: mapWriter ] in NeoJSONWriter>>writeStreamingDo: in Block: [ block value: mapWriter ]
NeoJSONWriter>>indentedDo:
NeoJSONWriter>>writeStreamingDo:
NeoJSONWriter>>writeMapStreamingDo:
ChartData>>neoJsonOn:
NeoJSONWriter>>nextPut:
ChartJsComponent>>printDiagramCreationOn:inDiv:
[ :s | 
self printDiagramContextCreationOn: s inDiv: divId.
s cr.
self printDiagramCreationOn: s inDiv: divId ] in [ self data hasData
    ifTrue: [ html div
            class: #chartJsGraph;
            with: [ canvas := html canvas id: #graph , divId.
                self manageCallBackIn: html canvas: canvas inDiv: divId ].
        self createIfNecessaryLegend: html inDiv: divId.
        html
            script:
                (String
                    streamContents: [ :s | 
                        self printDiagramContextCreationOn: s inDiv: divId.
                        s cr.
                        self printDiagramCreationOn: s inDiv: divId ]) ]
    ifFalse: [ html div
            class: 'mdl-alert mdl-alert__danger';
            style: 'color: red; text-align: center; margin: auto;';
            with: [ html text: 'No data to display' ] ].
self data hasTitle ifTrue: [ self renderTitleId: divId on: html ] ] in ChartJsComponent>>renderContentOn: in Block: [ :s | ...
String class(SequenceableCollection class)>>new:streamContents:
String class(SequenceableCollection class)>>streamContents:
[ self data hasData
    ifTrue: [ html div
            class: #chartJsGraph;
            with: [ canvas := html canvas id: #graph , divId.
                self manageCallBackIn: html canvas: canvas inDiv: divId ].
        self createIfNecessaryLegend: html inDiv: divId.
        html
            script:
                (String
                    streamContents: [ :s | 
                        self printDiagramContextCreationOn: s inDiv: divId.
                        s cr.
                        self printDiagramCreationOn: s inDiv: divId ]) ]
    ifFalse: [ html div
            class: 'mdl-alert mdl-alert__danger';
            style: 'color: red; text-align: center; margin: auto;';
            with: [ html text: 'No data to display' ] ].
self data hasTitle ifTrue: [ self renderTitleId: divId on: html ] ] in ChartJsComponent>>renderContentOn: in Block: [ self data hasData...
BlockClosure>>renderOn:
mahugnon commented 4 years ago

Bizare. I will look at that

Le jeu. 2 janv. 2020 à 11:44, CyrilFerlicot notifications@github.com a écrit :

I tried the demo and now it does not open anymore.

Here is the error I get:

UndefinedObject>>doesNotUnderstand: #new ChartData>>resetBackgroundwithDataSize [ :jsonMapWriter | jsonMapWriter writeKey: #labels value: (xObjects collect: [ :aXObject | self labelFor: aXObject ]). jsonMapWriter writeKey: #datasets value: self resetBackgroundwithDataSize ] in ChartData>>neoJsonOn: in Block: [ :jsonMapWriter | ... [ block value: mapWriter ] in NeoJSONWriter>>writeStreamingDo: in Block: [ block value: mapWriter ] NeoJSONWriter>>indentedDo: NeoJSONWriter>>writeStreamingDo: NeoJSONWriter>>writeMapStreamingDo: ChartData>>neoJsonOn: NeoJSONWriter>>nextPut: ChartJsComponent>>printDiagramCreationOn:inDiv: [ :s | self printDiagramContextCreationOn: s inDiv: divId. s cr. self printDiagramCreationOn: s inDiv: divId ] in [ self data hasData ifTrue: [ html div class: #chartJsGraph; with: [ canvas := html canvas id: #graph , divId. self manageCallBackIn: html canvas: canvas inDiv: divId ]. self createIfNecessaryLegend: html inDiv: divId. html script: (String streamContents: [ :s | self printDiagramContextCreationOn: s inDiv: divId. s cr. self printDiagramCreationOn: s inDiv: divId ]) ] ifFalse: [ html div class: 'mdl-alert mdl-alertdanger'; style: 'color: red; text-align: center; margin: auto;'; with: [ html text: 'No data to display' ] ]. self data hasTitle ifTrue: [ self renderTitleId: divId on: html ] ] in ChartJsComponent>>renderContentOn: in Block: [ :s | ... String class(SequenceableCollection class)>>new:streamContents: String class(SequenceableCollection class)>>streamContents: [ self data hasData ifTrue: [ html div class: #chartJsGraph; with: [ canvas := html canvas id: #graph , divId. self manageCallBackIn: html canvas: canvas inDiv: divId ]. self createIfNecessaryLegend: html inDiv: divId. html script: (String streamContents: [ :s | self printDiagramContextCreationOn: s inDiv: divId. s cr. self printDiagramCreationOn: s inDiv: divId ]) ] ifFalse: [ html div class: 'mdl-alert mdl-alertdanger'; style: 'color: red; text-align: center; margin: auto;'; with: [ html text: 'No data to display' ] ]. self data hasTitle ifTrue: [ self renderTitleId: divId on: html ] ] in ChartJsComponent>>renderContentOn: in Block: [ self data hasData... BlockClosure>>renderOn:

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/DuneSt/ChartJs/pull/15?email_source=notifications&email_token=AF7H2SZHJAHMEKFLMNUQT7DQ3XASBA5CNFSM4JDB4JFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEH6CJ2I#issuecomment-570172649, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF7H2SZSUNQLIQMRNFTSDRLQ3XASBANCNFSM4JDB4JFA .