Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bliss
bliss
Commits
9ab47bf7
Commit
9ab47bf7
authored
May 28, 2021
by
Valentin Valls
Browse files
Make sure the curve tooltip is working with many scans
parent
c68ba64c
Changes
2
Hide whitespace changes
Inline
Side-by-side
bliss/flint/widgets/curve_plot.py
View file @
9ab47bf7
...
...
@@ -825,6 +825,7 @@ class CurvePlotWidget(plot_helper.PlotWidget):
style
=
item
.
getStyle
(
scan
)
curveItem
=
plot_helper
.
FlintCurve
()
curveItem
.
setCustomItem
(
item
)
curveItem
.
setScan
(
scan
)
curveItem
.
setData
(
x
=
xx
,
y
=
yy
,
copy
=
False
)
curveItem
.
setName
(
legend
)
curveItem
.
setLineStyle
(
style
.
lineStyle
)
...
...
bliss/flint/widgets/utils/plot_helper.py
View file @
9ab47bf7
...
...
@@ -481,6 +481,8 @@ class FlintItemMixIn:
def
_getColoredSymbol
(
self
,
flintModel
,
scan
:
scan_model
.
Scan
):
"""Returns a colored HTML char according to the expected plot item style
"""
if
scan
is
None
:
scan
=
self
.
__scan
plotItem
=
self
.
customItem
()
if
plotItem
is
not
None
:
style
=
plotItem
.
getStyle
(
scan
)
...
...
@@ -560,7 +562,7 @@ class FlintCurve(Curve, FlintItemMixIn):
xName
=
"X"
yName
=
"Y"
char
=
self
.
_getColoredSymbol
(
flintModel
,
scan
)
char
=
self
.
_getColoredSymbol
(
flintModel
,
None
)
text
=
f
"""
<li style="white-space:pre">
{
char
}
<b>
{
yName
}
:</b>
{
yValue
}
(index
{
index
}
)</li>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment