英文:
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's creating padding above the chart. How to make the title appear inside chart?
chart.setTitle("title");
I tried padding on chart, this one hides the title:
chart.setTitle("title").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("series-left-top")
</details>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论