Skip to content
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

support for latest chart.js (or list versions for dependencies) #108

Open
carandraug opened this issue Aug 31, 2022 · 7 comments
Open

support for latest chart.js (or list versions for dependencies) #108

carandraug opened this issue Aug 31, 2022 · 7 comments

Comments

@carandraug
Copy link
Member

SPEKcheck was developed with chart.js version 2.X. The latest chart.js version is 3.X and 4.X seems to be close to release (considering they have a migration guide for version 4). These major releases are backwards incompatible.

We could update SPEKcheck for compatibility with the last release. However, considering that in this js ecosystem things break very often we should list the versions that it was developed for and adjust the Makefile correspondingly. Currently, the Makefile that prepares the release picks up the list of files that we need, extracts the package name, and npm installs them. To include version number I think we need to change the approach.

@iandobbie
Copy link
Member

I have spent some time fixing this on my machine and it appears that the current versions of bootstrap (4.1.1) jQuery (3.6.0) and popper (which I cant find a version number on) all work fine it is only chart.js which is an issue.

I had substantial problems reverting to the working version of chart.js as in some way Chrome was caching things even when I started a new incognito window. It only started to work when I restarted chrome and reloaded the site.

@iandobbie
Copy link
Member

How I got the system to run was:

  1. clone the github repository

  2. go to root dir of source and install chart.js. I found it worked up to 2.8
    npm install [email protected]

  3. use make to get the rest of the npm stuff, and do the configure, populate dyes json etc...
    make

  4. start a simple server
    python -m SimpleHTTPServer

  5. connect from a web browser to http://localhost:8000

@iandobbie
Copy link
Member

I have started to work on this and the crashing errors are quite easy to get rid of and are fixed on my branch chartv3, however the displayed charts are blank, not sure why.

@iandobbie
Copy link
Member

Finally worked out the issue, chart.js v3 requires explicit showLine and fill options to enable the display we need.

@iandobbie
Copy link
Member

Just found another problem, the chart title commands have changed and so the title with efficiencies etc is missing. I have a fix but it needs to be integrated.

@iandobbie
Copy link
Member

I suggest once these fixes are properly integrated that I move the chart.js v2 version to a new branch, and update the master branch to chart.js v3 compatible code.

I hope everyone is happy with this.

@iandobbie
Copy link
Member

Ok, no comments on this so I'm going to create a chartv2 branch and move master onto a branch that is compatible with chart.js v3. I think my current branch of that name has some JHU stuff in it so I'll fiddle around and fix it so we have the same generic setups but the chart.js v3 compatibility.

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

No branches or pull requests

2 participants