antvis / data-set

state driven all in one data process for data visualization.
MIT License
248 stars 46 forks source link

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

Open calebeaires opened 4 years ago

calebeaires commented 4 years ago

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

ThenMorning commented 4 years ago

+1

ThenMorning commented 4 years ago

+1

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

topwood commented 2 years ago

+1