I have installed the package from d3.js
and d3-selection-multi
. In my app/app.component.ts
file I try to import them.
import * as d3 from 'd3';
import * as d3SelectionMulti from 'd3-selection-multi';
My idea is to use the .attrs
attribute that embeds but I get this error:
.attrs is not a function
this is my code:
import * as d3 from 'd3';
import * as d3SelectionMulti from 'd3-selection-multi';
.
.
var duration = 5000;
var posicionFinal = 250;
var posicionActual = 0;
var segundosDuracion = 0;
var oProperties = { x: posicionFinal, fill: "red" };
rectangle
.datum(oProperties)
.transition()
.duration(duration)
.ease(d3.easeLinear)
.attrs(oProperties)
how can I solve that?
this is my live code:
https://stackblitz.com/edit/d3-angular-wusbox?file=src%2Fapp%2Fapp.component.ts
from how can i do import of d3-selection-multi in typescript
No comments:
Post a Comment