Bug 340440

Summary: legend colors do not match the graph
Product: [Frameworks and Libraries] massif-visualizer Reporter: Ben Boeckel <bugzilla.kde>
Component: memorychartAssignee: Massif Visualizer developers <massif-visualizer>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: master   
Target Milestone: 0.4   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: screenshot of graph color not matching the legend
Data file for graph in the screenshot

Description Ben Boeckel 2014-10-28 21:52:57 UTC
When looking at the graph and the legend, the colors do not match. Attached is an image showing a selected (blue) section left of center which highlights the "vtkDataSetSurfaceFilter" entry in the tree on the right. The legend shows that this should be a dark green instead.

I do not have KGraphViewer enabled.

Reproducible: Always
Comment 1 Ben Boeckel 2014-10-28 21:53:30 UTC
Created attachment 89349 [details]
screenshot of graph color not matching the legend
Comment 2 Milian Wolff 2014-10-29 10:27:14 UTC
can you attach the massif file so I can try to reproduce this issue?
Comment 3 Ben Boeckel 2014-10-29 15:03:56 UTC
Created attachment 89362 [details]
Data file for graph in the screenshot

Here's the data file shown in the screenshot. Git hash: 1dd8878037809506320020b7d01fc293f7876963
Comment 4 Milian Wolff 2014-10-30 10:48:50 UTC
I can confirm, the colors seem to be completely off ;-)

thanks for the report, I'll have a look.

cheers
Comment 5 Milian Wolff 2014-10-30 11:41:38 UTC
Git commit 2f8fba08781d6d4c807d0208b577b3262f87e76b by Milian Wolff.
Committed on 30/10/2014 at 11:39.
Pushed by mwolff into branch 'master'.

Honor DatasetBrushRole in the headerData of our models.

This is required now, as the current KDChart version gets the data
from there to put it into the legend. Otherwise, it uses some default
color scheme which differs from the data we show in the plot itself.

M  +34   -21   visualizer/detailedcostmodel.cpp
M  +8    -2    visualizer/totalcostmodel.cpp

http://commits.kde.org/massif-visualizer/2f8fba08781d6d4c807d0208b577b3262f87e76b
Comment 6 Ben Boeckel 2014-10-30 17:46:39 UTC
Confirmed. Thanks.