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:
@@ -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>
|
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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>
|
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user