duxappEcharts

百度图表

DuxApp 1.0.6 更新于 2026-01-16

功能概述

移动端百度图表支持模块

说明文档

echarts

集成百度图表插件,基于 duxappCanvas 兼容多端渲染,RN 端使用 Skia Canvas

安装

yarn duxapp app add echarts

使用

import { Chart } from '@/duxappEcharts'
import { Header, ScrollView, TopView, GroupList, px } from '@/duxuiExample'

import {
  PieChart,
  LineChart,
  BarChart
} from 'echarts/charts'

import {
  TooltipComponent,
  GridComponent,
  TitleComponent,
  LegendComponent
} from 'echarts/components'

const options = {
  line: {
    xAxis: {
      type: 'category',
      data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
    },
    yAxis: {
      type: 'value'
    },
    series: [
      {
        data: [150, 230, 224, 218, 135, 147, 260],
        type: 'line'
      }
    ]
  },
  bar: {
    xAxis: {
      type: 'category',
      data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
    },
    yAxis: {
      type: 'value'
    },
    series: [
      {
        data: [120, 200, 150, 80, 70, 110, 130],
        type: 'bar'
      }
    ]
  },
  pie: {
    title: {
      text: 'Referer of a Website',
      subtext: 'Fake Data',
      left: 'center'
    },
    tooltip: {
      trigger: 'item'
    },
    legend: {
      orient: 'vertical',
      left: 'left'
    },
    series: [
      {
        name: 'Access From',
        type: 'pie',
        radius: '50%',
        data: [
          { value: 1048, name: 'Search Engine' },
          { value: 735, name: 'Direct' },
          { value: 580, name: 'Email' },
          { value: 484, name: 'Union Ads' },
          { value: 300, name: 'Video Ads' }
        ],
        emphasis: {
          itemStyle: {
            shadowBlur: 10,
            shadowOffsetX: 0,
            shadowColor: 'rgba(0, 0, 0, 0.5)'
          }
        }
      }
    ]
  }
}

export default function CellExample() {

  return <TopView>
    <Header title='Chart' />
    <ScrollView>
      <GroupList>
        <GroupList.Item title='折线图'>
          <Chart
            style={{ height: px(400) }}
            option={options.line}
            components={[LineChart, TooltipComponent, GridComponent, TitleComponent, LegendComponent]}
          />
        </GroupList.Item>
        <GroupList.Item title='柱状图'>
          <Chart
            style={{ height: px(400) }}
            option={options.bar}
            components={[BarChart, TooltipComponent, GridComponent]}
          />
        </GroupList.Item>
        <GroupList.Item title='饼图'>
          <Chart
            style={{ height: px(400) }}
            option={options.pie}
            components={[PieChart, TooltipComponent, GridComponent]}
          />
        </GroupList.Item>
      </GroupList>
    </ScrollView>
  </TopView>
}

更新日志

V2023-12-02

发布说明

  • 发布首个版本

免费使用

当前应用可直接安装使用,无需额外购买授权

免费应用可直接通过下方安装方式接入项目。

购买说明

• 购买后可在个人中心下载最新版本

• 授权绑定您的账号 Key,请妥善保管

• 如需退款请在购买后 7 天内联系客服

• 企业授权支持开具增值税发票

免费 套餐
免费应用,无需购买即可安装使用。

安装方式

Terminal
yarn duxapp app add duxappEcharts
1

登录 DuxLite 后台,进入「应用商店」。

2

搜索「百度图表」并点击 安装

3

如应用需要授权,请先在个人中心完成购买并同步账号 Key。

开发者 duxapp
版本 1.0.6
下载量 62
销量 0
加密方式 开源