| OLD | NEW |
| 1 // | 1 // |
| 2 // Copyright 2014 Google Inc. All rights reserved. | 2 // Copyright 2014 Google Inc. All rights reserved. |
| 3 // | 3 // |
| 4 // Use of this source code is governed by a BSD-style | 4 // Use of this source code is governed by a BSD-style |
| 5 // license that can be found in the LICENSE file or at | 5 // license that can be found in the LICENSE file or at |
| 6 // https://developers.google.com/open-source/licenses/bsd | 6 // https://developers.google.com/open-source/licenses/bsd |
| 7 // | 7 // |
| 8 | 8 |
| 9 part of charted.charts; | 9 part of charted.charts; |
| 10 | 10 |
| 11 class LineChartRenderer extends CartesianRendererBase { | 11 class LineChartRenderer extends CartesianRendererBase { |
| 12 final Iterable<int> dimensionsUsingBand = const []; | 12 final Iterable<int> dimensionsUsingBand = const []; |
| 13 final SubscriptionsDisposer _disposer = new SubscriptionsDisposer(); | |
| 14 | 13 |
| 15 final bool alwaysAnimate; | 14 final bool alwaysAnimate; |
| 16 final bool trackDataPoints; | 15 final bool trackDataPoints; |
| 17 final bool trackOnDimensionAxis; | 16 final bool trackOnDimensionAxis; |
| 18 final int quantitativeScaleProximity; | 17 final int quantitativeScaleProximity; |
| 19 | 18 |
| 20 bool _trackingPointsCreated = false; | 19 bool _trackingPointsCreated = false; |
| 21 List _xPositions = []; | 20 List _xPositions = []; |
| 22 | 21 |
| 23 // Currently hovered row/column | 22 // Currently hovered row/column |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 area.state.select(int.parse(e.dataset['column'])); | 241 area.state.select(int.parse(e.dataset['column'])); |
| 243 } | 242 } |
| 244 if (mouseClickController != null && e.tagName == 'circle') { | 243 if (mouseClickController != null && e.tagName == 'circle') { |
| 245 var row = int.parse(e.dataset['row']), | 244 var row = int.parse(e.dataset['row']), |
| 246 column = int.parse(e.dataset['column']); | 245 column = int.parse(e.dataset['column']); |
| 247 mouseClickController.add( | 246 mouseClickController.add( |
| 248 new DefaultChartEventImpl(scope.event, area, series, row, column, d)); | 247 new DefaultChartEventImpl(scope.event, area, series, row, column, d)); |
| 249 } | 248 } |
| 250 } | 249 } |
| 251 | 250 |
| 252 void _mouseOverHandler(d, i, e) { | 251 void _mouseOverHandler(d, int i, Element e) { |
| 253 if (area.state != null) { | 252 if (area.state != null) { |
| 254 area.state.preview = int.parse(e.dataset['column']); | 253 area.state.preview = int.parse(e.dataset['column']); |
| 255 } | 254 } |
| 256 if (mouseOverController != null && e.tagName == 'circle') { | 255 if (mouseOverController != null && e.tagName == 'circle') { |
| 257 _savedOverRow = int.parse(e.dataset['row']); | 256 _savedOverRow = int.parse(e.dataset['row']); |
| 258 _savedOverColumn = int.parse(e.dataset['column']); | 257 _savedOverColumn = int.parse(e.dataset['column']); |
| 259 mouseOverController.add(new DefaultChartEventImpl( | 258 mouseOverController.add(new DefaultChartEventImpl( |
| 260 scope.event, area, series, _savedOverRow, _savedOverColumn, d)); | 259 scope.event, area, series, _savedOverRow, _savedOverColumn, d)); |
| 261 } | 260 } |
| 262 } | 261 } |
| 263 | 262 |
| 264 void _mouseOutHandler(d, i, e) { | 263 void _mouseOutHandler(d, int i, Element e) { |
| 265 if (area.state != null && | 264 if (area.state != null && |
| 266 area.state.preview == int.parse(e.dataset['column'])) { | 265 area.state.preview == int.parse(e.dataset['column'])) { |
| 267 area.state.preview = null; | 266 area.state.preview = null; |
| 268 } | 267 } |
| 269 if (mouseOutController != null && e.tagName == 'circle') { | 268 if (mouseOutController != null && e.tagName == 'circle') { |
| 270 mouseOutController.add(new DefaultChartEventImpl( | 269 mouseOutController.add(new DefaultChartEventImpl( |
| 271 scope.event, area, series, _savedOverRow, _savedOverColumn, d)); | 270 scope.event, area, series, _savedOverRow, _savedOverColumn, d)); |
| 272 } | 271 } |
| 273 } | 272 } |
| 274 } | 273 } |
| OLD | NEW |