quantmind / d3-canvas-transition Goto Github PK
View Code? Open in Web Editor NEWtransition on canvas with d3
License: BSD 3-Clause "New" or "Revised" License
transition on canvas with d3
License: BSD 3-Clause "New" or "Revised" License
Is there a way to bundle this plugin with d3 using Webpack?
I found a way to import some of the functions through:
import * as d3base from 'd3';
import { getSize, resolution, selectCanvas } from 'd3-canvas-transition';
const d3 = Object.assign(d3base, { getSize, resolution, selectCanvas });
But some can't be imported, because they applied to selection.prototype
directly.
And I keep getting an error in the console ....attr(...).canvasResolution is not a function
I have code like this:
let plot = visibleArea
.append("g")
.attr("clip-path", "url(#clip)");
visibleArea
.append("g")
.append("clipPath")
.attr("id", "clip")
.append("rect")
.attr("x", margin)
.attr("y", margin)
.attr("width", width - margin - 2axisWidth + 5)
.attr("height", height - margin - 2axisWidth + 5);
I've found that it doesn't work when I use d3-canvas-transition and rendering to canvas.
Can it be fixed? Or maybe there is some workaround for this problem?
There is a bug in the transition handling.
The Sobol block does not work on canvas when transition is switched on.
In src/tag/path.js
line 15 - if (fill) ctx.fill();
- this is wrong. For filling Path2D in method fill
need pass current instance Path2D
Currently, selection only works with tag name and class. It does not work for ids.
After zooming, the position is offset rather than zoomed in or out according to the mouse position.
Finally using svg...
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.