Comments (2)
First example provided in 5f15bf0.
g2.chart
is accepting functions (e.g. Math.sin
), which is not supported by JSON.
We could add some kind of parsing here, for example the ability for g2.chart
to accept strings like "sin"
, "cos"
, "PI"
etc. to be handled accordingly.
from g2.
The most simple way here would be to use eval
... but it's evil.
I also would like to have normal strings in JSON data and interprete them like template strings.
I once read a discussions about that:
https://stackoverflow.com/questions/29182244/convert-a-string-to-a-template-string
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#Never_use_eval!
The Function related solution sounds promising ... try it.
from g2.
Related Issues (20)
- mec documentation missing most symbols HOT 8
- pulley2 angle not working HOT 1
- g2.ext.md
- g2 chart HOT 1
- mec pulley() bug? HOT 1
- .exe() not chainable HOT 1
- tests for extensions are in old repositories HOT 1
- symbols documentation
- truss example missing bar labels ... HOT 1
- g2.editor.js should be removed ...
- Microsoft Edge not supported HOT 6
- State and Style example ... HOT 1
- 'format' property for 'ply' command
- remove usage of Map in g2.core
- .img() parameters HOT 3
- 'scl' property of 'img' disappeared HOT 8
- 'ins' command should accept 'g2' objects
- chart-element should reside in dist folder HOT 1
- xmin, xmax in chart do not work properly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from g2.