Comments (6)
I.
I like the idea to have a minimal set of kwargs options so only animoptions could be assed as keyword argument.
(it is a further problem with this, Style(None) needs to work to reset previous style modifications, but now it is working only in kwargs style=None)
I thought that both Style(None)
and style=None
will end up in {"style": null}
. Does the extra parameters beside Style(...)
and style=...
causes the problem?
II.
We could move the merge rule into the Animation
classes so every animation could merge into each other (or raise an error). This would be very flexible but not so easy to reason about.
@veghdev, could yout give some example (maybe from the vizzu documentation) where we have this problem?
from ipyvizzu.
@nyirog Thanks, based on your comment, I will stay with option I. and I'll write the pull request for this issue in the next days.
The problem with style reset:
- We want to send {"style": null} to the JS API
(there is an example in the 5th animation: https://vizzuhq.github.io/ipyvizzu/examples/palette_font.html) - Now, we can do it in that way: chart.animate(style=None) (as a kwarg)
- But now we can not initialize Style class with None: Style(None) raise TypeError: 'NoneType' object is not iterable (cause it inherits from dict)
from ipyvizzu.
The TypeError
is caused by the dict
parent. It is a bug I'll fix it in a minute.
Is there other animation which can be None eg.: Config(None)
=> {"config": null}
?
from ipyvizzu.
Sorry, I do not know, @simzer Is there other animation which can be null?
from ipyvizzu.
@nyirog No, config and data cannot be null (at least for now), but animOption can.
This is the API declaration file for JS in TypeScript format:
https://github.com/vizzuhq/vizzu-lib/blob/main/src/apps/weblib/js-api/vizzu.d.ts
from ipyvizzu.
Also, on the JS API animate can accept a snapshot parameter instead of { data, config, style }, which is a chart state previously saved by a chart.store() call, basically a pointer to an object on the webassembly heap.
If this flexible function signature is not Pythonesque, I can imagine a chart.restore(a) method in ipyvizzu instead.
from ipyvizzu.
Related Issues (20)
- make os independent development environment HOT 1
- documentation: create tutorial for setting Chart Styles HOT 2
- documentation: customize MkDocs material theme HOT 4
- question: why does not plot.marker.label.color work? HOT 1
- question: does ipyvizzu work in PyCharm HOT 2
- add numpy array support (Data class) HOT 2
- support event handlers using pyodide HOT 1
- extract pandas dataframe -> vizzu data obj conversion into separate package/module
- question: how to show percentage on label in a 100% stack plot HOT 1
- support calling back to the Python kernel from events
- use Poetry with pyproject.toml HOT 2
- use tox and run tests with different python versions
- python development: make os independent development environment HOT 1
- test compatibility in different platforms
- documentation: create data conversion examples HOT 4
- question: ipyvizzu is not showing plot output in jupyter lab HOT 1
- documentation: update Mercury example in environments
- test compatibility in different platforms HOT 1
- Circular import error with ipyvizzu HOT 7
- need help with POC HOT 1
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 ipyvizzu.