Skip to content

Chart js2.8 #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 30 commits into
base: development
Choose a base branch
from
Open

Chart js2.8 #15

wants to merge 30 commits into from

Conversation

mahugnon
Copy link

We propose an update of ChartJs to 2.8 version of ChartJS

@jecisc
Copy link
Member

jecisc commented Oct 25, 2019

I opened the demo and saw some problems:

  • The 1D demos do not have any color
  • The Polar shape does not print anything
  • The BoxPlot does not print anything
  • The style demo is broken
  • The callback feature is broken

This need to be addressed before we review the model.

@mahugnon
Copy link
Author

mahugnon commented Oct 25, 2019

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

jecisc and others added 6 commits November 25, 2019 11:42
-create chartType1d to check if the chart is one dimenssion 
-resetBackgroundwithDataSize transform the background color to an array as 1d charts  have array as background color
@mahugnon
Copy link
Author

mahugnon commented Dec 2, 2019

ChartJs 2.8 does not support BoxPlot directly

@jecisc
Copy link
Member

jecisc commented Jan 2, 2020

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
Copy link
Author

mahugnon commented Jan 2, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants