Skip to content

Add texttemplate attribute to shape.label #6527

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Apr 17, 2023
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
7071ff9
support shape.label.texttemplate attribute
emilykl Mar 13, 2023
b153b2d
add mock
emilykl Mar 13, 2023
0fb52cd
add label.texttemplate to draw_newshape
emilykl Mar 13, 2023
a5b9aa8
update plot-schema
emilykl Mar 14, 2023
ead380a
rename some functions/variables, add comments, improve docstrings
emilykl Mar 14, 2023
eaf1927
add baseline for new mock
emilykl Mar 14, 2023
9575eb3
update some editTypes, fix drag behavior
emilykl Mar 14, 2023
10550bb
update plot-schema
emilykl Mar 14, 2023
5f54668
add additional shape label template vars, exclude paths
emilykl Mar 21, 2023
0b2bb2a
handle datetimes and log axes, small refactor, fix docstrings
emilykl Mar 29, 2023
657ec2e
improved mock for shape label text templates
emilykl Mar 29, 2023
91ceff2
update mocks, fix attr bug
emilykl Mar 29, 2023
ad4841f
improve docstring
emilykl Mar 29, 2023
b7eeb59
update plot-schema
emilykl Mar 29, 2023
9276af4
update plot-schema
emilykl Mar 29, 2023
48e273e
simplify exports/imports for shapeLabelTexttemplateVars
emilykl Mar 29, 2023
efea57b
small cleanup
emilykl Mar 29, 2023
8eb9cf7
revise label_texttemplate to handle log
archmoj Mar 29, 2023
4a3a7ae
small cleanup, disable slope variable for non-lines
emilykl Mar 31, 2023
c619433
small adjustment to mock
emilykl Mar 31, 2023
ba780f9
update image baseline
emilykl Mar 31, 2023
e1ac9d7
improved coerce behavior
emilykl Apr 10, 2023
e6f76d5
fix texttemplate behavior for log axes and simplify
emilykl Apr 10, 2023
a9a559e
add category axis to mock
emilykl Apr 10, 2023
b82896a
handle paper-referenced shapes
emilykl Apr 10, 2023
970943b
update image baseline
emilykl Apr 10, 2023
66a12de
fix mock
emilykl Apr 13, 2023
3b32d8d
update image baseline
emilykl Apr 14, 2023
0163281
simplify parsing logic
emilykl Apr 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions test/image/mocks/zz-text_on_shapes_texttemplate.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@
},
{
"label": {
"text": "this will be overridden",
"texttemplate": "Here is x0 divided by 2: %{x0/2:.2f}"
},
"layer": "above",
Expand Down Expand Up @@ -212,16 +211,6 @@
},
"editable": true
},
{
"label": {
"texttemplate": "paths have no slope: %{slope}",
"textposition": "top center",
"yanchor": "bottom"
},
"editable": true,
"path": "M3.71,0.75L2.26,3.99L3.71,3.99Z",
"layer": "above"
},
Copy link
Contributor

@archmoj archmoj Apr 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{
"label": {
"texttemplate": "x0: %{x0}, x1: %{x1}<br>dy: %{dy:.2f}, dx: %{dx:.2f}<br>slope: %{slope:.2f}<br>length: %{length:.2f}<br>",
Expand Down