antvis / data-set

state driven all in one data process for data visualization.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dateset build size is big, how to use parts of it?

calebeaires opened this issue · comments

  • Platform: Vue CLI 3 + ViserJS

I am using viserjs to show a single chart. I use date-set to pivot the data to an Pie Chart, like the code below.

import DataSet from "@antv/data-set";
    const dv = new DataSet.View().source(data);

    dv.transform({
      type: "percent",
      field: this.measureName,
      dimension: this.dimensionName,
      as: "percent"
    });

Is there some way to import just the transform part of the @antv/data-set lib (ex.: import {transform} from "@antv/data-set")?

After build, the size of @antv/data-set is big, but my code does not need everthing!

Screen Shot 2019-12-23 at 12 12 36

+1

I had fixed it by import what i used from "node_modules/antv/lib/transform" .

commented

+1