Commit 25c9845
Fix #5613: Apply impliedEdits for contours initialization
When creating Contour, Histogram2dContour, or Contourcarpet traces
with contours.size, contours.start, or contours.end properties,
the autocontour property should be automatically set to False
to respect the manual contour specifications.
The Plotly schema defines impliedEdits that set autocontour=False
when these properties are specified. Previously, this only worked
for dynamic updates via restyle (e.g., dropdown menus), but not
for initial trace creation.
Changes:
- Modified codegen/datatypes.py to add get_implied_edits_code()
function that generates Python code to apply impliedEdits during
initialization
- Updated build_datatype_py() to call get_implied_edits_code()
and insert the generated code into __init__ methods
The auto-generated graph_objs files should be regenerated by running:
python codegen/__init__.py
Fixes: #5613
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>1 parent 50bb20b commit 25c9845
2 files changed
Lines changed: 80 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
59 | 133 | | |
60 | 134 | | |
61 | 135 | | |
| |||
404 | 478 | | |
405 | 479 | | |
406 | 480 | | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
407 | 486 | | |
408 | 487 | | |
409 | 488 | | |
| |||
0 commit comments