universal_echarts 1.0.0+4 copy "universal_echarts: ^1.0.0+4" to clipboard
universal_echarts: ^1.0.0+4 copied to clipboard

A null-safe package that display beautiful charts on both Web and Mobile through Echarts SDK.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:universal_echarts/universal_echarts.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(title: 'Flutter Web Demo'),
    );
  }
}

class MyHomePage extends StatelessWidget {
  final String? title;

  MyHomePage({this.title});

  final option = '''
  {
            title: {
                text: 'ECharts entry example'
            },
            tooltip: {},
            legend: {
                data:['Sales']
            },
            xAxis: {
                data: ["shirt","cardign","chiffon shirt","pants","heels","socks"]
            },
            yAxis: {},
            series: [{
                name: 'Sales',
                type: 'bar',
                data: [5, 20, 36, 10, 10, 20]
            }]
        }
  ''';

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text(title ?? ''),
        ),
        body: UniversalEcharts.drawChart(option));
  }
}
3
likes
70
pub points
0%
popularity

Publisher

unverified uploader

A null-safe package that display beautiful charts on both Web and Mobile through Echarts SDK.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, flutter_echarts, flutter_markdown, html2md, markdown

More

Packages that depend on universal_echarts