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

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

Issue 1521693002: Roll Observatory deps (charted -> ^0.3.0) (Closed) Base URL: https://chromium.googlesource.com/external/github.com/dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years 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/chart_legend_impl.dart
diff --git a/packages/charted/lib/charts/src/chart_legend_impl.dart b/packages/charted/lib/charts/src/chart_legend_impl.dart
index 37778e1a735f3c32cc3ae30bc12247191e866eec..dfefbc4487a96a5d70f235bb70690454daa3cb3d 100644
--- a/packages/charted/lib/charts/src/chart_legend_impl.dart
+++ b/packages/charted/lib/charts/src/chart_legend_impl.dart
@@ -100,7 +100,7 @@ class DefaultChartLegendImpl implements ChartLegend {
var tooltip = _root.select('.chart-legend-more-tooltip');
if (tooltip.isEmpty) {
tooltip = _root.select('.chart-legend-more').append('div')
- ..classed('chart-legend-more-tooltip');
+ ..classed('chart-legend-more-tooltip');
}
tooltip.style('opacity', '1');
@@ -110,8 +110,8 @@ class DefaultChartLegendImpl implements ChartLegend {
/// Creates legend items starting at the given index.
void _createLegendItems() {
var state = _area.state,
- rows = _root.selectAll(
- '.chart-legend-row').data(_items, (x) => x.hashCode),
+ rows =
+ _root.selectAll('.chart-legend-row').data(_items, (x) => x.hashCode),
isFirstRender = rows.length == 0;
var enter = rows.enter.appendWithCallback((d, i, e) {
@@ -120,8 +120,10 @@ class DefaultChartLegendImpl implements ChartLegend {
..className = 'chart-legend-color',
label = Namespace.createChildElement('div', e)
..className = 'chart-legend-label',
- value = showValues ? (Namespace.createChildElement('div', e)
- ..className = 'chart-legend-value') : null;
+ value = showValues
+ ? (Namespace.createChildElement('div', e)
+ ..className = 'chart-legend-value')
+ : null;
var rowStyles = ['chart-legend-row'].toList();
@@ -136,8 +138,8 @@ class DefaultChartLegendImpl implements ChartLegend {
rowStyles.add('chart-legend-selected');
}
}
- rowStyles.addAll(
- d.series.map((ChartSeries x) => 'type-${x.renderer.name}'));
+ rowStyles
+ .addAll(d.series.map((ChartSeries x) => 'type-${x.renderer.name}'));
color.style.setProperty('background-color', d.color);
row.append(color);
@@ -186,17 +188,17 @@ class DefaultChartLegendImpl implements ChartLegend {
enter
..on('mouseover', (d, i, e) => state.preview = d.index)
..on('mouseout', (d, i, e) {
- if (state.preview == d.index) {
- state.preview = null;
- }
- })
+ if (state.preview == d.index) {
+ state.preview = null;
+ }
+ })
..on('click', (d, i, e) {
- if (state.isSelected(d.index)) {
- state.unselect(d.index);
- } else {
- state.select(d.index);
- }
- });
+ if (state.isSelected(d.index)) {
+ state.unselect(d.index);
+ } else {
+ state.select(d.index);
+ }
+ });
}
rows.exit.remove();
« no previous file with comments | « packages/charted/lib/charts/src/chart_events_impl.dart ('k') | packages/charted/lib/charts/src/chart_state_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698