Files
vue-ts-example/public/iframe/for-plotly.html
严浩 3daf4b2e21
Some checks failed
/ build-and-deploy-to-vercel (push) Successful in 2m50s
/ lint-build-and-check (push) Successful in 5m52s
/ surge (push) Successful in 2m50s
/ playwright (push) Failing after 11m32s
feat: plotly-locale-zh-cn.js
2025-04-18 12:51:30 +08:00

39 lines
1.1 KiB
HTML

<!--
XXX: Plotly 需要用 iframe 嵌套在页面中的原因:
-->
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Plotly 图表的 HTML 页面</title>
<!-- <script src="https://cdn.plot.ly/plotly-3.0.1.js"></script> -->
<script src="./plotly-3.0.1.js"></script>
<!-- https://github.com/plotly/plotly.js/blob/master/dist/README.md#to-include-localization -->
<script src="./plotly-locale-zh-cn.js"></script>
</head>
<body>
<script>Plotly.setPlotConfig({locale: 'zh-CN'})</script>
<div id="PLOTLY_CHART_spectrogram" style="width: 100%; height: 100%"></div>
<div id="PLOTLY_CHART_waterfall" style="width: 100%; height: 100%"></div>
</body>
<style>
html,
body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
overflow: hidden; /* 防止滚动条出现 */
}
/* 确保容器占满整个 iframe */
body {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
</style>
</html>