[英]Amcharts5 legend vertical align doesn't work
我是 Amcharts5 的新手。 這是我的 XY 圖表,它有 3 個系列:
var chart3 = root3.container.children.push(
am5xy.XYChart.new(root3, {
layout: root3.horizontalLayout
}),
);
我試圖在我的 XY 圖表的右上角放置一個圖例,並且我遵循了官方文檔。 這是我的垂直對齊配置(與官方文檔中的完全相同):
var legend = chart3.children.push(
am5.Legend.new(root3, {
centerY: am5.percent(0),
y: am5.percent(0),
})
);
這是 output:帶有圖例的 XY 圖表我真的不知道為什么它不起作用......
您是否嘗試過手動設置 centerX 和 x ?
var legend = chart3.children.push(
am5.Legend.new(root3, {
centerX: am5.percent(100),
x: am5.percent(100),
centerY: am5.percent(0),
y: am5.percent(0),
})
);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.