小编Eti*_*Eti的帖子

如何在颤振、x 轴和 y 轴上为图表添加名称?

我一直在使用 Flutter 图表的在线图库 ( https://google.github.io/charts/flutter/gallery.html ),但我正在努力为 x 和 y 轴值添加标题。

有人可以帮助我或告诉我如何将标签添加到图表中吗?

charts bar-chart dart flutter dart-2

5
推荐指数
1
解决办法
3828
查看次数

如何在颤振图中显示 json 数据

我还是新手,我一直在尝试在条形图中显示来自 http 请求的一些数据。我找不到任何例子。我希望你们中的一些人可以提供帮助:)

我想使用在线图库中的此图表。我刚刚为我的应用更改了类的名称:

import 'package:flutter/material.dart';
import 'package:charts_flutter/flutter.dart' as charts;

class SimpleSeriesLegend extends StatelessWidget {
  final List<charts.Series> seriesList;
  final bool animate;

  SimpleSeriesLegend(this.seriesList, {this.animate});

  factory SimpleSeriesLegend.withSampleData() {
    return new SimpleSeriesLegend(
      _createSampleData(),
      // Disable animations for image tests.
      animate: false,
    );
  }

  @override
  Widget build(BuildContext context) {
    return new charts.BarChart(
      seriesList,
      animate: animate,
      barGroupingType: charts.BarGroupingType.grouped,
      // Add the series legend behavior to the chart to turn on series legends.
      // By default the legend will display above the chart.
      behaviors: …
Run Code Online (Sandbox Code Playgroud)

charts json httprequest flutter

3
推荐指数
1
解决办法
9135
查看次数

标签 统计

charts ×2

flutter ×2

bar-chart ×1

dart ×1

dart-2 ×1

httprequest ×1

json ×1