simonbrunel / qtchartjs Goto Github PK
View Code? Open in Web Editor NEWExperimental Chart.js QML integration
Experimental Chart.js QML integration
Hello Simon,
Thanks a lot for this great implementation. I successfully used it till now in a project in mine, but since an update to QT 5.12, it unfortunatly stopped working.
5.12 brings apparently a lot regarding javascript performance. I tried looking into the issue for about 3 hours now but couldn't even do the slightest progress. I guess my Javascript/QML level simply isn't good enough.
Following error occurs:
qtchartjs/Private/Library.js:9: TypeError: Cannot read property 'global' of undefined
For reference, the line is the following one.
Chart.helpers.merge(Chart.defaults.global, {
It's the first reference to objects in Chart and Chart is defined using
.import "../Library/Chart.bundle.min.js" as Chart
What I tried so far: I tried changing Chart to another import name. Tried to update the Chart.js library to the latest version. Tried to switch to mjs file extension. Tried also the non .min. library (It doesn't bring more informations). Tried to remove the code from the global function and put is directly into the lib.
The file Chart.bundle.min.js is found, I tried importing an non-existing file and it fails differently.
I don't get any step further than that.
Do you have any other ideas? Do you think it's a 5.12 issue?
When I try to build the project, I get the following error (no matter whether I do it from the terminal or from Qt Creator):
Project ERROR: Project has no top-level .qmake.conf file.
The error occurs while executing the qmake command on src/imports/imports.pro
.
We are trying to implement chart.js into our qml app and are somewhat stuck at the eventListeners.
While some work fine (like 'click') others like hovering over "datapoints" result in
RangeError: Maximum call stack size exceeded.
usually somewhere within (Library.js)
Chart.helpers.merge(Chart.platform, { addEventListener: function(chart, type, listener) {
any clues?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.