highChars 用法

[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)
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容