mirror of
https://github.com/lana-k/sqliteviz.git
synced 2025-12-06 18:18:53 +08:00
#89 remove head and body
This commit is contained in:
@@ -45,11 +45,7 @@ export function getChartData (element) {
|
||||
export function getHtml (options) {
|
||||
const chartId = nanoid()
|
||||
return `
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<script src="https://cdn.plot.ly/plotly-latest.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script src="https://cdn.plot.ly/plotly-latest.js" charset="UTF-8"></script>
|
||||
<div id="${chartId}"></div>
|
||||
<script>
|
||||
const el = document.getElementById("${chartId}")
|
||||
@@ -68,7 +64,6 @@ export function getHtml (options) {
|
||||
|
||||
Plotly.newPlot(el, ${JSON.stringify(options.data)}, ${JSON.stringify(options.layout)})
|
||||
</script>
|
||||
</body>
|
||||
`
|
||||
}
|
||||
|
||||
|
||||
@@ -84,8 +84,6 @@ export async function getPivotCanvas (pivotOutput) {
|
||||
|
||||
export function getPivotHtml (pivotOutput) {
|
||||
return `
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
table.pvtTable {
|
||||
font-family: Arial, sans-serif;
|
||||
@@ -112,9 +110,6 @@ export function getPivotHtml (pivotOutput) {
|
||||
border: 1px solid #DFE8F3;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
${pivotOutput.outerHTML}
|
||||
</body>
|
||||
`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user