Histogram bug fixes
ClosedPublic

Authored by garvitkhatri on Jun 21 2018, 5:35 PM.

Details

Reviewers
sgerlach
asemke
Summary

This patch includes the following:

  1. Fixes histogram bugs
  2. Removes the recalculate button as it was not working properly and redraw on value update instead.
  3. Fix autoscaling functionality for histograms. (still has a minor bus, which will be solved when we will have vertical histograms)

I have also pushed the code to histogram_vertical branch, you can check that out to test it.

Diff Detail

Repository
R262 LabPlot
Lint
Lint Skipped
Unit
Unit Tests Skipped
garvitkhatri created this revision.Jun 21 2018, 5:35 PM
Restricted Application added a project: KDE Edu. · View Herald TranscriptJun 21 2018, 5:35 PM
Restricted Application removed a subscriber: KDE Edu. · View Herald Transcript
garvitkhatri requested review of this revision.Jun 21 2018, 5:35 PM
garvitkhatri edited the summary of this revision. (Show Details)Jun 21 2018, 5:38 PM
asemke added inline comments.Jun 23 2018, 5:44 AM
src/backend/worksheet/plots/cartesian/Histogram.cpp
155

Use a std-setter class here defined via out macros to the the undo/redo-stuff.

157

Once you switched to the std-setter, retransform() needs to be called, no need to emit this signal anymore.

161

similar here, use std-setter.

172

for the getters we also use macros. Check how all other getters are declared and defined.

176

also here, use std-setter with retransform(), no need for this emit.

180

also here, use std-setter with retransform(), no need for this emit.

src/backend/worksheet/plots/cartesian/Histogram.h
48

HistorgramOrientation would be a better name or this enum, similar to AxisOrientation.

garvitkhatri added inline comments.Jun 25 2018, 5:18 PM
src/backend/worksheet/plots/cartesian/Histogram.cpp
157

this will still need to be called as cartesian plot listens for this and autoscale axes based on this signal

garvitkhatri added inline comments.Jun 29 2018, 12:24 AM
src/backend/worksheet/plots/cartesian/Histogram.cpp
176

I cannot make this change right now, firstly this is not changed by me right now. Also, it sets the data inside a struct, which would lead the std-setter to fail as it calls fieldnamechanged function inside it and here the field is something like histogramData.binsOption.

176

I will make this change in another diff all together since it would need more refactoring

asemke accepted this revision.Jun 29 2018, 7:24 AM
This revision is now accepted and ready to land.Jun 29 2018, 7:24 AM
asemke closed this revision.Sep 16 2018, 7:11 PM

Revised version of the changes is already in master. Closing this revision.