美文网首页
highChars 用法

highChars 用法

作者: OldSix1987 | 来源:发表于2016-08-18 15:42 被阅读21次

[highChartsDemo]{http://www.highcharts.com/demo}

柱形图



series = [{
    'name': 'OS X',
    'data': [11],
    'type': 'column'
},{
    'name': 'Ubuntu',
    'data': [8],
    'type': 'column'
},{
    'name': 'Windows',
    'data': [12],
    'type': 'column'
},{
    'name': 'Others',
    'data': [29],
    'type': 'column'
}]

options = {
    'title': { 
          'text': 'Charts are Awesome!!'
    }
}

charts.plot(series, show='inlines', options=options)

折线图


options = {
      'chart': {'zoomType':xy},
      'title': {'text':'Monthly Average Temprature'},
      'subtitle':{'text':'Source:WorldClimate.com'},
      'xAxis':{'categories':{'周一','周二','周三','周四'}},
      'yAxis':{'title':{'text':'数量'}}
}

series = [{
    'name': 'OS X',
    'data': [11, 2, 3, 5],
    'type': 'column'
},{
    'name': 'Ubuntu',
    'data': [8, 5, 6, 7],
    'type': 'column'
},{
    'name': 'Windows',
    'data': [12, 6, 9 ,2],
    'type': 'column'
},{
    'name': 'Others',
    'data': [29, 23, 21, 34],
    'type': 'column'
}]

charts.plot(series, show='inline',options=options)

相关文章

网友评论

      本文标题:highChars 用法

      本文链接:https://www.haomeiwen.com/subject/egmvsttx.html