antvis / antvis/data-set

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

Open
#66 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
251
Forks
49
PR merge metrics
No merged PRs in 30d

Description

* **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.

```javascript
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](https://user-images.githubusercontent.com/794195/71365506-fb91d680-257d-11ea-8141-5e14cb386d3a.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.