在 lightningChart js 中设置样式/删除轴重叠指示器

Style / remove axis overlap indicator in lightningChart js

我想在 LightningChartJs 中设置轴的样式,但无法删除轴重叠和轴末端的小线(请参见下图)。

设置轴的粗细对指标没有影响:

const axisYStyles = axisYColors.map((color) => new SolidFill({ color }));
const axisYStrokeStyles = axisYStyles.map((fillStyle) => new SolidLine({ fillStyle, thickness: 1 }));
    
const axisX = this.chart.getDefaultAxisX()
                            .setStrokeStyle(axisYStrokeStyles[0]);

如果有人可以帮助并解释如何删除或设置此项目的样式,那就太好了。提前致谢。

轴线两端的小线称为“笔尖”。您可以使用 Axis.setNibStyle().

设计和隐藏笔尖

emptyLine可用于完全去除轴线和笔尖线。

// Axis styling
chart.getDefaultAxisX()
    // Hide the main axis line
    .setStrokeStyle(emptyLine)
    // Hide the Nib at the ends of the axis
    .setNibStyle(emptyLine)

// Extract required parts from LightningChartJS.
const {
    lightningChart,
    emptyLine
} = lcjs

const chart = lightningChart()
    .ChartXY()

// Axis styling
chart.getDefaultAxisX()
    // Hide the main axis line
    .setStrokeStyle(emptyLine)
    // Hide the Nib at the ends of the axis
    .setNibStyle(emptyLine)
chart.getDefaultAxisY()
    // Hide the main axis line
    .setStrokeStyle(emptyLine)
    // Hide the Nib at the ends of the axis
    .setNibStyle(emptyLine)
<script src="https://unpkg.com/@arction/lcjs@1.3.1/dist/lcjs.iife.js"></script>