如何在Fusion Chart上没有玻璃效果的情况下使条形圆滑?

问题描述 投票:1回答:1

目的是将边界半径效果应用于图表栏。我发现的只是这个圆边的例子。

https://www.fusioncharts.com/dev/chart-guide/chart-configurations/data-plot#round-edges-7

但是,它应用时会带有玻璃效果。如何使用玻璃效果并保持圆润效果?

fusioncharts
1个回答
0
投票

FusionCharts不支持柱形图上的圆角,但是,您可以使用弧形注释形状并创建边缘圆角,但请注意注释本质上是静态的,下面是示例图表:

 FusionCharts.ready(function() {
  var salesChart = new FusionCharts({
      type: 'MSColumn2D',
      renderAt: 'chart-container',
      width: '600',
      height: '400',
      dataFormat: 'json',
      dataSource: {
        "chart": {
          "caption": "Sales report of Apple products",
          "subcaption": "In Billion $",
          "yaxismaxvalue": "250",
          "decimals": "0",
          "numberprefix": "$",
          "numbersuffix": "B",
          "placevaluesinside": "1",
          "paletteColors": "#FF0000,#00FF00,#FFFF00",
          "divlinealpha": "56",
          "plotfillalpha": "100",
          "plotSpacePercent": "47",
          "crossLineColor": "#cc3300",
          "crossLineAlpha": "100",
          "theme": "zune"
        },
        "annotations": {
          "showbelow": "1",
          "groups": [{
            "id": "transarc",
            "items": [{
                "type": "arc",
                "radius": "16",
                "borderColor": "#FFFFFF",
                "innerRadius": "0",
                "color": "#FF0000",
                "alpha": "100",
                "x": "$dataset.0.set.0.x",
                "y": "$dataset.0.set.0.STARTY+2",
                "startangle": "0",
                "endangle": "180"
              }, {
                "type": "arc",
                "radius": "16",
                "borderColor": "#FFFFFF",
                "innerRadius": "0",
                "color": "#FF0000",
                "alpha": "100",
                "x": "$dataset.0.set.1.x",
                "y": "$dataset.0.set.1.STARTY+2",
                "startangle": "0",
                "endangle": "180"
              }, {
                "type": "arc",
                "radius": "16",
                "borderColor": "#FFFFFF",
                "innerRadius": "0",
                "color": "#FF0000",
                "alpha": "100",
                "x": "$dataset.0.set.2.x",
                "y": "$dataset.0.set.2.STARTY+2",
                "startangle": "0",
                "endangle": "180"
              },
              {
                "type": "arc",
                "radius": "16",
                "borderColor": "#FFFFFF",
                "innerRadius": "0",
                "color": "#00FF00",
                "alpha": "100",
                "x": "$dataset.1.set.0.x",
                "y": "$dataset.1.set.0.STARTY+2",
                "startangle": "0",
                "endangle": "180"
              }, {
                "type": "arc",
                "radius": "16",
                "borderColor": "#FFFFFF",
                "innerRadius": "0",
                "color": "#00FF00",
                "alpha": "100",
                "x": "$dataset.1.set.1.x",
                "y": "$dataset.1.set.1.STARTY+2",
                "startangle": "0",
                "endangle": "180"
              }, {
                "type": "arc",
                "radius": "16",
                "borderColor": "#FFFFFF",
                "innerRadius": "0",
                "color": "#00FF00",
                "alpha": "100",
                "x": "$dataset.1.set.2.x",
                "y": "$dataset.1.set.2.STARTY+2",
                "startangle": "0",
                "endangle": "180"
              },
              {
                "type": "arc",
                "radius": "16",
                "borderColor": "#FFFFFF",
                "innerRadius": "0",
                "color": "#FFFF00",
                "alpha": "100",
                "x": "$dataset.2.set.0.x",
                "y": "$dataset.2.set.0.STARTY+2",
                "startangle": "0",
                "endangle": "180"
              }, {
                "type": "arc",
                "radius": "16",
                "borderColor": "#FFFFFF",
                "innerRadius": "0",
                "color": "#FFFF00",
                "alpha": "100",
                "x": "$dataset.2.set.1.x",
                "y": "$dataset.2.set.1.STARTY+2",
                "startangle": "0",
                "endangle": "180"
              }, {
                "type": "arc",
                "radius": "16",
                "borderColor": "#FFFFFF",
                "innerRadius": "0",
                "color": "#FFFF00",
                "alpha": "100",
                "x": "$dataset.2.set.2.x",
                "y": "$dataset.2.set.2.STARTY+2",
                "startangle": "0",
                "endangle": "180"
              }
            ]
          }]
        },
        "categories": [{
          "category": [{
              "label": "2012"
            },
            {
              "label": "2013"
            },
            {
              "label": "2014"
            }
          ]
        }],
        "dataset": [{
            "seriesname": "iPod",
            "data": [{
                "value": "42.63"
              },
              {
                "value": "35.16"
              },
              {
                "value": "26.38"
              }
            ]
          },
          {
            "seriesname": "iPhone",
            "data": [{
                "value": "125.04"
              },
              {
                "value": "150.26"
              },
              {
                "value": "169.22"
              }
            ]
          },
          {
            "seriesname": "iPad",
            "data": [{
                "value": "58.31"
              },
              {
                "value": "71.04"
              },
              {
                "value": "67.99"
              }
            ]
          }
        ]
      }
    })
    .render();
});
© www.soinside.com 2019 - 2024. All rights reserved.