-
Change Request
-
Resolution: Unresolved
-
Major
-
None
-
6.0.25, 6.4.10, 7.0.0alpha9
-
None
When multiple items are chosen in the Svg Graph and are aggregated by the whole dataset, the first result from the function getColorVariations becomes the color of the aggregated data set. This is confusing and can lead to unexpected colors in the graph.
For whole data set aggregations the original color choice should be used from $options['data_sets'].
For example, in getMetricsAggregatedData(), starting at line 701, some simple logic could be added to easily fix this:
699 if ($metric['options']['aggregate_grouping'] == GRAPH_AGGREGATE_BY_DATASET) { 700 $dataset_metrics[$dataset_num] = $metric_num; 701 if ($data_sets[$dataset_num]['dataset_type'] == CWidgetFieldDataSet::DATASET_TYPE_PATTERN_ITEM) { 702 $metric['options']['color'] = '#' . $data_sets[$dataset_num]['color']; 703 } 704 else { 705 $metric['options']['color'] = '#' . $data_sets[$dataset_num]['color'][0]; 706 } 707 }