Skip to content

Commit 10fa649

Browse files
committed
use config.typesetMath internally
1 parent 17af0b3 commit 10fa649

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

components/dash-core-components/src/fragments/Graph.react.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,10 @@ class PlotlyGraph extends Component {
159159
return Plotly.animate(gd, figure, animation_options);
160160
}
161161

162-
const configClone = this.getConfig(config, responsive);
163162
const layoutClone = this.getLayout(figure.layout, responsive);
163+
const configClone = this.getConfig(config, responsive);
164+
// add typesetMath | not exposed to the dash API
165+
configClone.typesetMath = this.props.mathjax;
164166

165167
gd.classList.add('dash-graph--pending');
166168

@@ -170,6 +172,9 @@ class PlotlyGraph extends Component {
170172
frames: figure.frames,
171173
config: configClone,
172174
}).then(() => {
175+
// clear typesetMath
176+
configClone.typesetMath = undefined;
177+
173178
const gd = this.gd.current;
174179

175180
// double-check gd hasn't been unmounted

components/dash-core-components/tests/integration/tab/test_tabs_with_graphs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ def check_graph_config_shape(dash_dcc):
211211
"globalTransforms",
212212
"notifyOnLogging",
213213
"role",
214+
"typesetMath",
214215
]
215216

216217
def crawl(schema, props):

0 commit comments

Comments
 (0)