将标题放在LightningChartJS图表内部

huangapple go评论38阅读模式
英文:

Place title inside the chart of LighningChartJS

问题

当我为图表添加标题时,它会在图表上方创建填充空间。如何使标题出现在图表内部?

chart.setTitle("title");

我尝试在图表上设置填充,但这会隐藏标题:

    bottom: 0,
    right: 0,
    top: -36,
    left: 0
}).setMouseInteractions(false);```

<details>
<summary>英文:</summary>

When I add title to chart it&#39;s creating padding above the chart. How to make the title appear inside chart?

    chart.setTitle(&quot;title&quot;);

I tried padding on chart, this one hides the title:

       chart.setTitle(&quot;title&quot;).setPadding({
                bottom: 0,
                right: 0,
                top: -36,
                left: 0
            }).setMouseInteractions(false);

</details>


# 答案1
**得分**: 1

请查看 https://lightningchart.com/lightningchart-js-api-documentation/v4.0.1/classes/ChartXY.html#setTitlePosition

ChartXY.setTitlePosition("series-left-top")

<details>
<summary>英文:</summary>

See https://lightningchart.com/lightningchart-js-api-documentation/v4.0.1/classes/ChartXY.html#setTitlePosition

    ChartXY.setTitlePosition(&quot;series-left-top&quot;)

</details>



huangapple
  • 本文由 发表于 2023年2月16日 14:30:34
  • 转载请务必保留本文链接:https://go.coder-hub.com/75468593.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定