| 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 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 _columnStateCache[column] = flags; | 175 _columnStateCache[column] = flags; |
| 176 }); | 176 }); |
| 177 }); | 177 }); |
| 178 } | 178 } |
| 179 | 179 |
| 180 Iterable<String> stylesForColumn(int column) { | 180 Iterable<String> stylesForColumn(int column) { |
| 181 if (_columnStylesCache[column] == null) { | 181 if (_columnStylesCache[column] == null) { |
| 182 if (state == null || area.useRowColoring) { | 182 if (state == null || area.useRowColoring) { |
| 183 _columnStylesCache[column] = const []; | 183 _columnStylesCache[column] = const []; |
| 184 } else { | 184 } else { |
| 185 var styles = [], flags = _columnStateCache[column]; | 185 var styles = <String>[], flags = _columnStateCache[column]; |
| 186 | 186 |
| 187 if (flags & ChartState.COL_SELECTED != 0) { | 187 if (flags & ChartState.COL_SELECTED != 0) { |
| 188 styles.add(ChartState.COL_SELECTED_CLASS); | 188 styles.add(ChartState.COL_SELECTED_CLASS); |
| 189 } else if (flags & ChartState.COL_UNSELECTED != 0) { | 189 } else if (flags & ChartState.COL_UNSELECTED != 0) { |
| 190 styles.add(ChartState.COL_UNSELECTED_CLASS); | 190 styles.add(ChartState.COL_UNSELECTED_CLASS); |
| 191 } | 191 } |
| 192 | 192 |
| 193 if (flags & ChartState.COL_HIGHLIGHTED != 0) { | 193 if (flags & ChartState.COL_HIGHLIGHTED != 0) { |
| 194 styles.add(ChartState.COL_HIGHLIGHTED_CLASS); | 194 styles.add(ChartState.COL_HIGHLIGHTED_CLASS); |
| 195 } else if (flags & ChartState.COL_UNHIGHLIGHTED != 0) { | 195 } else if (flags & ChartState.COL_UNHIGHLIGHTED != 0) { |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 } | 269 } |
| 270 if (state.hovered != null && state.hovered.last == row) { | 270 if (state.hovered != null && state.hovered.last == row) { |
| 271 flags |= ChartState.VAL_HOVERED; | 271 flags |= ChartState.VAL_HOVERED; |
| 272 } | 272 } |
| 273 _valueColorCache[hash] = | 273 _valueColorCache[hash] = |
| 274 theme.getColorForKey(area.useRowColoring ? row : column, flags); | 274 theme.getColorForKey(area.useRowColoring ? row : column, flags); |
| 275 _valueFilterCache[hash] = theme.getFilterForState(flags); | 275 _valueFilterCache[hash] = theme.getFilterForState(flags); |
| 276 } | 276 } |
| 277 } | 277 } |
| 278 } | 278 } |
| OLD | NEW |