mirror of https://github.com/flutter/samples.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
114 lines
4.3 KiB
114 lines
4.3 KiB
// Copyright 2018 the Charts project authors. Please see the AUTHORS file
|
|
// for details.
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
import 'package:flutter/material.dart';
|
|
import '../gallery_scaffold.dart';
|
|
import 'animation_zoom.dart';
|
|
import 'area_and_line.dart';
|
|
import 'dash_pattern.dart';
|
|
import 'line_annotation.dart';
|
|
import 'points.dart';
|
|
import 'range_annotation.dart';
|
|
import 'range_annotation_margin.dart';
|
|
import 'segments.dart';
|
|
import 'simple.dart';
|
|
import 'simple_nulls.dart';
|
|
import 'stacked_area.dart';
|
|
import 'stacked_area_custom_color.dart';
|
|
import 'stacked_area_nulls.dart';
|
|
|
|
List<GalleryScaffold> buildGallery() {
|
|
return [
|
|
GalleryScaffold(
|
|
listTileIcon: const Icon(Icons.show_chart),
|
|
title: 'Simple Line Chart',
|
|
subtitle: 'With a single series and default line point highlighter',
|
|
childBuilder: () => SimpleLineChart.withRandomData(),
|
|
),
|
|
GalleryScaffold(
|
|
listTileIcon: const Icon(Icons.show_chart),
|
|
title: 'Stacked Area Chart',
|
|
subtitle: 'Stacked area chart with three series',
|
|
childBuilder: () => StackedAreaLineChart.withRandomData(),
|
|
),
|
|
GalleryScaffold(
|
|
listTileIcon: const Icon(Icons.show_chart),
|
|
title: 'Stacked Area Custom Color Chart',
|
|
subtitle: 'Stacked area chart with custom area skirt color',
|
|
childBuilder: () => StackedAreaCustomColorLineChart.withRandomData(),
|
|
),
|
|
GalleryScaffold(
|
|
listTileIcon: const Icon(Icons.show_chart),
|
|
title: 'Area and Line Combo Chart',
|
|
subtitle: 'Combo chart with one line series and one area series',
|
|
childBuilder: () => AreaAndLineChart.withRandomData(),
|
|
),
|
|
GalleryScaffold(
|
|
listTileIcon: const Icon(Icons.show_chart),
|
|
title: 'Points Line Chart',
|
|
subtitle: 'Line chart with points on a single series',
|
|
childBuilder: () => PointsLineChart.withRandomData(),
|
|
),
|
|
GalleryScaffold(
|
|
listTileIcon: const Icon(Icons.show_chart),
|
|
title: 'Null Data Line Chart',
|
|
subtitle: 'With a single series and null measure values',
|
|
childBuilder: () => SimpleNullsLineChart.withRandomData(),
|
|
),
|
|
GalleryScaffold(
|
|
listTileIcon: const Icon(Icons.show_chart),
|
|
title: 'Stacked Area with Nulls Chart',
|
|
subtitle: 'Stacked area chart with three series and null measure values',
|
|
childBuilder: () => StackedAreaNullsLineChart.withRandomData(),
|
|
),
|
|
GalleryScaffold(
|
|
listTileIcon: const Icon(Icons.show_chart),
|
|
title: 'Dash Pattern Line Chart',
|
|
subtitle: 'Line chart with dash patterns',
|
|
childBuilder: () => DashPatternLineChart.withRandomData(),
|
|
),
|
|
GalleryScaffold(
|
|
listTileIcon: const Icon(Icons.show_chart),
|
|
title: 'Segments Line Chart',
|
|
subtitle: 'Line chart with changes of style for each line',
|
|
childBuilder: () => SegmentsLineChart.withRandomData(),
|
|
),
|
|
GalleryScaffold(
|
|
listTileIcon: const Icon(Icons.show_chart),
|
|
title: 'Line Annotation Line Chart',
|
|
subtitle: 'Line chart with line annotations',
|
|
childBuilder: () => LineLineAnnotationChart.withRandomData(),
|
|
),
|
|
GalleryScaffold(
|
|
listTileIcon: const Icon(Icons.show_chart),
|
|
title: 'Range Annotation Line Chart',
|
|
subtitle: 'Line chart with range annotations',
|
|
childBuilder: () => LineRangeAnnotationChart.withRandomData(),
|
|
),
|
|
GalleryScaffold(
|
|
listTileIcon: const Icon(Icons.show_chart),
|
|
title: 'Range Annotation Margin Labels Line Chart',
|
|
subtitle: 'Line chart with range annotations with labels in margins',
|
|
childBuilder: () => LineRangeAnnotationMarginChart.withRandomData(),
|
|
),
|
|
GalleryScaffold(
|
|
listTileIcon: const Icon(Icons.show_chart),
|
|
title: 'Pan and Zoom Line Chart',
|
|
subtitle: 'Simple line chart pan and zoom behaviors enabled',
|
|
childBuilder: () => LineAnimationZoomChart.withRandomData(),
|
|
),
|
|
];
|
|
}
|