iOS Swift中的议会图表

时间:2019-05-30 09:13:59

标签: ios swift highcharts

议会图表在Swift HighCharts iOS中不起作用。我正在使用7.1.1版。试图以与JSFiddle相同的方式使用此方法。但仍然无法正常工作。

  let chart = HIChart()
    let options = HIOptions()
    chart.type = "item"
    let title = HITitle()
    title.text = "Highcharts item chart"
    let item = HIItem()
    item.innerSize = "60%"
    item.name = "Representatives"
    item.keys = ["name", "y"]
    item.data = [["A", 69], ["B", 153], ["C", 67], ["D", 80], ["E", 200], ["F", 46]]
    item.colors = ["#A2205F", "#D41C1B", "#729E40", "#C2B930", "#000000", "#459EDA"]
    item.dataLabels = HIDataLabelsOptionsObject()
    item.dataLabels.enabled = true
    item.dataLabels.format = "{point.label}"
    item.center = ["50%", "88%"]
    item.size = "170%"
    item.startAngle = -100
    item.endAngle = 100
    chart.displayErrors = true
    options.chart = chart
    options.title = title
    options.series = NSArray.init(array: [item]) as? [HIItem]
    chartView.options = options

0 个答案:

没有答案