Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: packages/charted/lib/charts/src/cartesian_area_impl.dart

Issue 2213693002: Updated charted DEP to 0.4.X (Closed) Base URL: https://github.com/dart-lang/observatory_pub_packages.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: packages/charted/lib/charts/src/cartesian_area_impl.dart
diff --git a/packages/charted/lib/charts/src/cartesian_area_impl.dart b/packages/charted/lib/charts/src/cartesian_area_impl.dart
index 81388733a919eda40c38c2d141693e2358a395f8..870971ac84aa9899c2481d8fdb13312cdc2bd1ac 100644
--- a/packages/charted/lib/charts/src/cartesian_area_impl.dart
+++ b/packages/charted/lib/charts/src/cartesian_area_impl.dart
@@ -13,7 +13,7 @@ part of charted.charts;
/// which contain two dimension axes.
class DefaultCartesianAreaImpl implements CartesianArea {
/// Default identifiers used by the measure axes
- static const MEASURE_AXIS_IDS = const ['_default'];
+ static const MEASURE_AXIS_IDS = const <String>['_default'];
/// Orientations used by measure axes. First, when "x" axis is the primary
/// and the only dimension. Second, when "y" axis is the primary and the only
@@ -117,7 +117,7 @@ class DefaultCartesianAreaImpl implements CartesianArea {
void dispose() {
_configEventsDisposer.dispose();
_dataEventsDisposer.dispose();
- _config.legend.dispose();
+ _config?.legend?.dispose();
if (_valueMouseOverController != null) {
_valueMouseOverController.close();
@@ -349,7 +349,6 @@ class DefaultCartesianAreaImpl implements CartesianArea {
}
String _orientRTL(String orientation) => orientation;
- Scale _scaleRTL(Scale scale) => scale;
/// Initialize the axes - required even if the axes are not being displayed.
_initAxes({bool preRender: false}) {
@@ -376,8 +375,8 @@ class DefaultCartesianAreaImpl implements CartesianArea {
measureAxisUsers.forEach((id, listOfSeries) {
var sampleCol = listOfSeries.first.measures.first,
sampleColSpec = data.columns.elementAt(sampleCol),
- axis = _getMeasureAxis(id),
- domain;
+ axis = _getMeasureAxis(id);
+ List domain;
if (sampleColSpec.useOrdinalScale) {
throw new UnsupportedError(
@@ -561,12 +560,13 @@ class DefaultCartesianAreaImpl implements CartesianArea {
if (_config == null || _config.legend == null || _series.isEmpty) return;
var legend = <ChartLegendItem>[];
- List seriesByColumn =
- new List.generate(data.columns.length, (_) => new List());
+ List<List<ChartSeries>> seriesByColumn =
+ new List<List<ChartSeries>>.generate(
+ data.columns.length, (_) => <ChartSeries>[]);
_series.forEach((s) => s.measures.forEach((m) => seriesByColumn[m].add(s)));
- seriesByColumn.asMap().forEach((int i, List s) {
+ seriesByColumn.asMap().forEach((int i, List<ChartSeries> s) {
if (s.length == 0) return;
legend.add(new ChartLegendItem(
index: i,
@@ -664,10 +664,10 @@ class _ChartAreaLayout implements ChartAreaLayout {
get axes => _axesView;
@override
- Rect renderArea;
+ Rect renderArea = const Rect();
@override
- Rect chartArea;
+ Rect chartArea = const Rect();
_ChartAreaLayout() {
_axesView = new UnmodifiableMapView(_axes);

Powered by Google App Engine
This is Rietveld 408576698