nodef / chartist-svg Goto Github PK
View Code? Open in Web Editor NEWGenerate SVG chart using chartist on node.js.
Home Page: https://www.npmjs.com/package/chartist-svg
License: MIT License
Generate SVG chart using chartist on node.js.
Home Page: https://www.npmjs.com/package/chartist-svg
License: MIT License
Hi, I'm trying to test the README example but I'm getting the following error:
const {createSVGWindow} = require('svgdom');
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /tmp/chartist-svg-issue/node_modules/svgdom/main-module.js from /tmp/chartist-svg-issue/node_modules/svgdom-css/index.js not supported.
Instead change the require of main-module.js in /tmp/chartist-svg-issue/node_modules/svgdom-css/index.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/tmp/chartist-svg-issue/node_modules/svgdom-css/index.js:2:27)
at Object.<anonymous> (/tmp/chartist-svg-issue/node_modules/chartist-svg/index.js:2:19)
at Object.<anonymous> (/tmp/chartist-svg-issue/index.js:2:21) {
code: 'ERR_REQUIRE_ESM'
}
Node v18.18.2
Is there a way to customize the CSS that Chartist uses to render the image? I'd like to change the colors of the lines on a line chart.
Thanks,
Martin
@wolfram77 Thanks upgrading package to Chartist v1.
I'm now passing as part of the options
:
lineSmooth: Chartist.Interpolation.step()
but the generated SVG does not have step smoothing. Is that not supported or am I passing it wrong?
Hi there,
thanks for creating such a useful library!
I am looking for a way to use a Chartist-defined interpolation function, like so in the series-specific options:
series: {
remaining: {
lineSmooth: Chartist.Interpolation.step(),
showPoint: false
}
Of course, Chartist itself including the Interpolation module can not be found. Including Chartist in my client code is also not working.
Is there a way to achieve this?
Thanks,
Martin
Trying to run it on Electron's background
Module parse failed: Unexpected token (2187:2)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| baseVal
|
> constructor(element, attributeName) {
| this.baseVal = new _SVGLength_js__WEBPACK_IMPORTED_MODULE_0__.SVGLength(element, attributeName)
| }
@ ./node_modules/svgdom-css/index.js 2:26-43
@ ./node_modules/chartist-svg/index.js
@ ./src/background.ts
@ multi ./src/background.ts
Chartist v1 has major API changes. Any chance of updating?
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.