How to use the @antv/data-set.DataSet.View function in @antv/data-set

To help you get started, we’ve selected a few @antv/data-set examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zhangdaiscott / jeecg-boot / ant-design-vue-jeecg / src / components / chart / LineChartMultid.vue View on Github external
data() {
        const dv = new DataSet.View().source(this.dataSource)
        dv.transform({
          type: 'fold',
          fields: this.fields,
          key: 'x',
          value: 'y'
        })
        let rows =  dv.rows
        // 替换别名
        rows.forEach(row => {
          for (let item of this.aliases) {
            if (item.field === row.x) {
              row.x = item.alias
              break
            }
          }
        })
github jeryqwq / OrderManage / client / src / pages / OrderReport / components / OrderStatusChart / AreaChart.jsx View on Github external
renderMap(){
    const dv = new DataSet.View().source(this.state.data);
    dv.transform({
      type: 'fold',
      fields: ['A'],
      key: 'type',
      value: 'value',
    });

    const scale = {
      value: {
        alias: 'The Share Price in Dollars',
        formatter: (val) => {
          return `该月份订单量${val}`;
        },
      },
      year: {
        range: [0, 1],
github dotnetcore / Util / sample / Util.Samples.Angular.AntDesign / Typings / util / viser / base / component-base.ts View on Github external
toData( model: Model ) {
        if ( !model.data )
            return [];
        let dataView = new DataSet.View().source( model.data );
        dataView.transform( {
            type: "fold",
            fields: model.columns,
            key: "key",
            value: "value",
        } );
        return dataView.rows;
    }
github alibaba / ice / react-materials / scaffolds / ice-design-schools / src / pages / Dashboard / components / OverviewChart / AreaChart.jsx View on Github external
render() {
    const data = [
      { month: '2018-01', Maths: 0, English: 0 },
      { month: '2018-02', Maths: 90, English: 60 },
      { month: '2018-03', Maths: 10, English: 80 },
      { month: '2018-04', Maths: 90, English: 20 },
      { month: '2018-05', Maths: 20, English: 70 },
      { month: '2018-06', Maths: 80, English: 59 },
      { month: '2018-07', Maths: 0, English: 0 },
    ];
    const dv = new DataSet.View().source(data);
    dv.transform({
      type: 'fold',
      fields: ['Maths', 'English'],
      key: 'type',
      value: 'value',
    });

    const scale = {
      value: {
        alias: 'The Share Price in Dollars',
        formatter: (val) => {
          return `${val}`;
        },
      },
      month: {
        range: [0, 1],
github zhangdaiscott / jeecg-boot / ant-design-vue-jeecg / src / components / chart / BarMultid.vue View on Github external
drawChart(){
        let temp = sourceDataConst;
        if(this.sourceData && this.sourceData.length>0){
          temp = this.sourceData
        }
        const dv = new DataSet.View().source(temp);
        dv.transform({
          type: 'fold',
          fields:(!this.fields||this.fields.length==0)?fieldsConst:this.fields,
          key: 'x',
          value: 'y',
        });
        this.chartData=dv.rows;
      }
    }
github dotnetcore / Util / sample / Util.Samples.Angular.AntDesign / Typings / util / viser / pie-wrapper.component.ts View on Github external
toData(model: Model) {
        let dataView = new DataSet.View().source(model.data);
        if (model.columns.length === 0)
            return dataView.rows;
        if (model.columns.length === 1) {
            dataView.transform({
                type: "percent",
                field: model.columns[0],
                dimension: 'name',
                as: 'percent'
            });
            return dataView.rows;
        }
        dataView.transform({
            type: "percent",
            fields: model.columns,
            dimension: 'name',
            as: 'percent'

@antv/data-set

data set with state management

MIT
Latest version published 4 years ago

Package Health Score

59 / 100
Full package analysis