我试图使用 R实现的amCharts 来调整Stacked Horizontal Bar图表的Text-label。以下是我的代码:
Fn
我希望将文本标签显示为https://www.amcharts.com/demos/stacked-bar-chart/,但是与'%'连接(与此处的自定义函数labelTextFunction
一样)。
我希望有一个像with open("textfile.txt") as f:
content = f.readlines()
for line in content:
# Get all variable-length spaces down to two. Then use two spaces as the delimiter.
while line.replace(" ", " ") != line:
line = line.replace(" ", " ")
# The strip is optional here.
data = line.strip().split(" ")
print(data)
这样的函数可以实现上述计划,但没有成功。
任何人都可以指导我如何使用amCharts的R实现来实现相同的目标。
谢谢,