加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

fusioncharts 3.4 抛弃swf的方式,采用纯js的html5 进行图表绘制

发布时间:2020-12-15 07:04:37 所属栏目:百科 来源:网络整理
导读:1. 适用msline 绘制多线图表的时候,原来的json对象无法绘制线型的问题。 主要是 用于 3.4 之前的版本 json 对象中的? categories :? 可以是一个对象。而在3.4 版本中必须是一个 数组 。 { "chart": { "caption": "Number of visitors last week","subCaptio

1. 适用msline 绘制多线图表的时候,原来的json对象无法绘制线型的问题。


主要是 用于 3.4 之前的版本 json 对象中的?categories:?

可以是一个对象。而在3.4 版本中必须是一个 数组

{
   "chart": {
      "caption": "Number of visitors last week","subCaption": "Bakersfield Central vs Los Angeles Topanga","xAxisName": "Day","showborder": "0","yAxisName": "No. of visitors","paletteColors": "#6baa01,#008ee4","bgAlpha": "0","borderAlpha": "20","canvasBorderAlpha": "0","usePlotGradientColor": "0","plotBorderAlpha": "10","legendBorderAlpha": "0","legendShadow": "0","captionpadding": "20","showXAxisLines": "1","axisLineAlpha": "25","divLineAlpha": "10","showValues": "0","showAlternateHGridColor": "0","animation": "0","showYAxisValues": "0","yAxisNamePadding": "100","showtooltip": "0"
   },"categories": [
      {
         "category": [
            {
               "label": "Mon"
            },{
               "label": "Tue"
            },{
               "label": "Wed"
            },{
               "vline": "true","lineposition": "0","color": "#6baa01","labelHAlign": "right","labelPosition": "0","label": "National holiday"
            },{
               "label": "Thu"
            },{
               "label": "Fri"
            },{
               "label": "Sat"
            },{
               "label": "Sun"
            }
         ]
      }
   ],"annotations": {
      "origw": "600","origh": "450","autoscale": "1","groups": [
         {
            "id": "ds1tips","items": [
               {
                  "id": "indicator-line","type": "line","dashed": "1"
               },{
                  "id": "tip1_1","type": "rectangle","fillcolor": "#6baa01","x": "$dataset.0.set.0.x + 5","y": "$dataset.0.set.0.y - 30","tox": "$dataset.0.set.0.x + 80","toy": "$dataset.0.set.0.y - 10"
               }
            ]
         },{
            "id": "yaxisline","items": [
               {
                  "id": "line","color": "#f8bd19","x": "$canvasstartx - 5","y": "$canvasstarty","tox": "$canvasstartx - 5","toy": "$canvasendy","thickness": "3"
               },{
                  "id": "none-label-bg","fillcolor": "#f8bd19","x": "$canvasstartx - 60","tox": "$canvasstartx - 15","y": "$canvasendy - 20","radius": "3"
               },{
                  "id": "none-dot","type": "circle","radius": "5","y": "$canvasendy - 10","color": "#f8bd19"
               },{
                  "id": "none-label","type": "text","fillcolor": "#ffffff","text": "None","x": "$canvasstartx - 37","y": "$canvasendy - 12","fontsize": "12","bold": "1"
               },{
                  "id": "few-label-bg","x": "$canvasstartx - 55","y": "$canvasendy - 100","toy": "$canvasendy - 80",{
                  "id": "few-dot","y": "$canvasendy - 90",{
                  "id": "few-label","text": "Few","x": "$canvasstartx - 35","y": "$canvasendy - 92",{
                  "id": "moderate-label-bg","x": "$canvasstartx - 85","y": "$canvasendy - 180","toy": "$canvasendy - 160",{
                  "id": "moderate-dot","y": "$canvasendy - 170",{
                  "id": "moderate-label","text": "Moderate","x": "$canvasstartx - 50","y": "$canvasendy - 172",{
                  "id": "maximum-label-bg","x": "$canvasstartx - 88","y": "$canvasendy - 260","toy": "$canvasendy - 240",{
                  "id": "maximum-dot","y": "$canvasendy - 252",{
                  "id": "maximum-label","text": "Maximum","x": "$canvasstartx - 52","bold": "1"
               }
            ]
         },{
            "id": "dyn-label-grp","items": [
               {
                  "id": "dyn-label-bg",{
                  "id": "dyn-label",{
                  "id": "dyn-detail-label","align": "right","x": "$canvasendx","bgcolor": "#ffffff"
               }
            ]
         }
      ]
   },"dataset": [
      {
         "seriesname": "Bakersfield Central","data": [
            {
               "value": "15123"
            },{
               "value": "14233"
            },{
               "value": "25507"
            },{
               "value": "9110"
            },{
               "value": "15529"
            },{
               "value": "20803"
            },{
               "value": "19202"
            }
         ]
      },{
         "seriesname": "Los Angeles Topanga","data": [
            {
               "value": "13400"
            },{
               "value": "12800"
            },{
               "value": "22800"
            },{
               "value": "12400"
            },{
               "value": "15800"
            },{
               "value": "19800"
            },{
               "value": "21800"
            }
         ]
      }
   ]
}

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读