1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-07 02:28:54 +08:00

#89 remove head and body

This commit is contained in:
lana-k
2021-12-22 20:42:53 +01:00
parent c7c727ff78
commit bb9ba08902
2 changed files with 1 additions and 11 deletions

View File

@@ -45,11 +45,7 @@ export function getChartData (element) {
export function getHtml (options) { export function getHtml (options) {
const chartId = nanoid() const chartId = nanoid()
return ` return `
<head> <script src="https://cdn.plot.ly/plotly-latest.js" charset="UTF-8"></script>
<meta charset="UTF-8">
<script src="https://cdn.plot.ly/plotly-latest.js"></script>
</head>
<body>
<div id="${chartId}"></div> <div id="${chartId}"></div>
<script> <script>
const el = document.getElementById("${chartId}") const el = document.getElementById("${chartId}")
@@ -68,7 +64,6 @@ export function getHtml (options) {
Plotly.newPlot(el, ${JSON.stringify(options.data)}, ${JSON.stringify(options.layout)}) Plotly.newPlot(el, ${JSON.stringify(options.data)}, ${JSON.stringify(options.layout)})
</script> </script>
</body>
` `
} }

View File

@@ -84,8 +84,6 @@ export async function getPivotCanvas (pivotOutput) {
export function getPivotHtml (pivotOutput) { export function getPivotHtml (pivotOutput) {
return ` return `
<head>
<meta charset="UTF-8">
<style> <style>
table.pvtTable { table.pvtTable {
font-family: Arial, sans-serif; font-family: Arial, sans-serif;
@@ -112,9 +110,6 @@ export function getPivotHtml (pivotOutput) {
border: 1px solid #DFE8F3; border: 1px solid #DFE8F3;
} }
</style> </style>
</head>
<body>
${pivotOutput.outerHTML} ${pivotOutput.outerHTML}
</body>
` `
} }