1 回答

TA貢獻1827條經驗 獲得超4個贊
可以使用自定義主題來編輯邊界框線條樣式。
LightningChart JS 導出customTheme
功能,可用于基于另一個主題創建新主題。您可以使用該函數創建一個新主題,并將邊界框線設置為emptyLine
。
const myTheme = customTheme(Themes.dark, {
? ? boundingBoxStyle3D: emptyLine
})
然后,當您創建 3D 圖表時,您可以使用創建的主題作為圖表應使用的主題。
const chart3D = lightningChart().Chart3D({
? ? theme: myTheme
})
請參閱下面的工作示例。
// Extract required parts from LightningChartJS.
const {
? ? lightningChart,
? ? SolidFill,
? ? SolidLine,
? ? Themes,
? ? customTheme,
? ? emptyLine,
? ? emptyTick
} = lcjs
// Create custom theme based on the dark theme and edit the boundingBoxStyle3D property to be emptyLine to hide the bounding box lines
const myTheme = customTheme(Themes.dark, {
? ? boundingBoxStyle3D: emptyLine
})
// Initiate chart
const chart3D = lightningChart().Chart3D({
? ? theme: myTheme
})
// Set Axis titles
chart3D.getDefaultAxisX()
? ? .setTickStrategy("Empty")
? ? .setStrokeStyle(emptyLine)
chart3D.getDefaultAxisY()
? ? .setTickStrategy("Empty")
? ? .setStrokeStyle(emptyLine)
chart3D.getDefaultAxisZ()
? ? .setTickStrategy("Empty")
? ? .setStrokeStyle(emptyLine)
<script src="https://unpkg.com/@arction/[email protected]/dist/lcjs.iife.js"></script>
添加回答
舉報