data-set icon indicating copy to clipboard operation
data-set copied to clipboard

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

Open calebeaires opened this issue 6 years ago • 3 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

calebeaires avatar Dec 23 '19 15:12 calebeaires

+1

ThenMorning avatar Apr 01 '20 07:04 ThenMorning

+1

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

ThenMorning avatar Apr 03 '20 10:04 ThenMorning

+1

topwood avatar Oct 09 '22 03:10 topwood