Bug 293230 - Legend entries can no longer be set manually
Summary: Legend entries can no longer be set manually
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 2.0.4
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-03 17:59 UTC by Nicolas Brisset
Modified: 2018-10-11 01:42 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Brisset 2012-02-03 17:59:42 UTC
Version:           2.0.4
OS:                Linux

In Kst 1.x it was possible to set legend entries used for the curves manually and independently from the curve name, so that it was possible to tune legends regardless of the sometimes weird names in vectors - or for some advanced usage. This is no longer possible with Kst 2.x and should be restored.
Example situation where this can be useful: see below.

Reproducible: Always

Steps to Reproduce:
- load CStk and PStk vs time from TWIN1xxx in sample_data/
- duplicate with the change data file tool to show from TWIN2 as well
- assign color per file: e.g. red for TWIN1 and blue for TWIN2
- try to show one global legend which explains that red = TWIN1 and blue=TWIN2 (I activate the legend for one plot and move it to the bottom of the window)

Actual Results:  
The only way to achieve the expected result is to change the curve names in the plot so that the legend contents are as wished. But then the curve names are only the file names, which makes it hard to handle when you have many curves and want to locate one in the data manager.

Expected Results:  
It should be possible to set the text used for the legend entry of a curve independently from the curve's name.
Comment 1 Nicolas Brisset 2012-02-03 18:02:41 UTC
I'd add a property to the curve class (bool _manualLegend) and 2 entries in the edit curve dialog, for instance below the curve name: a checkbox "Manual legend" and when set it'd activate a QLineEdit to set the legend text.
When drawing the legend, we'd just check if we should use the manual entry or the curve name.
Comment 2 Nicolas Brisset 2012-02-03 18:07:54 UTC
Hum, apparently there is already a _manualDescriptiveName property which is used when set. But... where can it be set???
Comment 3 Netterfield 2018-10-11 01:42:20 UTC
Git commit eeddc65e4fac824a66825349b49c66c11429e267 by Barth Netterfield.
Committed on 05/10/2018 at 15:28.
Pushed by netterfield into branch 'master'.

Curve Dialog gets a manual Legend Name entry.

This overrides all automatic naming.

M  +31   -2    src/libkstapp/curvedialog.cpp
M  +6    -0    src/libkstapp/curvedialog.h
M  +60   -1    src/libkstapp/curvetab.ui
M  +13   -4    src/libkstapp/datadialog.cpp
M  +1    -0    src/libkstapp/datadialog.h
M  +22   -42   src/libkstapp/legenditem.cpp
M  +47   -1    src/libkstmath/relation.cpp
M  +8    -1    src/libkstmath/relation.h

https://commits.kde.org/kst-plot/eeddc65e4fac824a66825349b49c66c11429e267