【问题标题】:Legend in FusionCharts (Pie chart) - PHPFusionCharts 中的图例(饼图) - PHP
【发布时间】:2015-09-03 14:05:58
【问题描述】:

是否可以在 PIE CHART (FUSIONCHARTS) - PHP 中显示图例?

showLegend 属性名称已激活但不显示!!!

Chart Attribute Name:
caption='Vendor Wise Data Volume' startingAngle ='90' showLegend='1' showPercentInToolTip='0' bgColor='f7f2ea' chartTopMargin='20' chartBottomMargin='20' formatNumberScale='0' pieRadius='100' exportEnabled='1' exportAtClient='1' exportHandler='index.php' labelDisplay='ROTATE'

【问题讨论】:

  • 我不知道 fusioncharts,我刚找到这个:kb.fusioncharts.com/questions/398/…;你试过了吗?
  • 您能否分享您的完整数据、图表维度和您正在使用的版本。你在使用 PHP 包装器吗?如果是,请尝试在不使用 PHP 的情况下正常渲染图表(纯 HTML.JS),看看它是否有效。只有在您提供足够的数据后,我们才能进行检查。截至目前,showLegend 属性将图例呈现在我们身边。
  • @zeflex 是的,我已阅读...并使用上面提到的相同属性 showLegend='1' 但没有用。

标签: javascript php charts data-visualization fusioncharts


【解决方案1】:

根据您的问题,我已经使用 FusionCharts 的图表Fiddle 进行了尝试。

    FusionCharts.ready(function() {
    var ageGroupChart = new FusionCharts({
        type: 'pie3d',
        renderAt: 'chart-container',
        width: '450',
        height: '300',
        dataFormat: 'json',
        dataSource: {
            "chart": {
                "caption": "Vendor Wise Data Volume",
                "paletteColors": "#FFFF00, #6495ED",
                "bgColor": "#f7f2ea",
                "showBorder": "0",
                "use3DLighting": "0",
                "showShadow": "0",
                "enableSmartLabels": "0",
                "startingAngle": "0",
                "labelDisplay": "Rotate",
                "showPercentValues": "1",
                "showPercentInTooltip": "0",
                "pieRadius": "100",
                "exportEnabled": "1",
                "decimals": "1",
                "captionFontSize": "14",
                "subcaptionFontSize": "14",
                "subcaptionFontBold": "0",
                "toolTipColor": "#ffffff",
                "toolTipBorderThickness": "0",
                "toolTipBgColor": "#000000",
                "toolTipBgAlpha": "80",
                "toolTipBorderRadius": "2",
                "toolTipPadding": "5",
                "showHoverEffect": "1",
                "startingAngle": "90",
                "showLegend": "1",
                "legendBgColor": "#ffffff",
                "legendBorderAlpha": '0',
                "legendShadow": '0',
                "legendItemFontSize": '10',
                "legendItemFontColor": '#666666'
            },
            "data": [
                {
                    "label": "2015-04-21, 813,740.59",
                    "value": "813740.59"
            },
                {
                    "label": "2015-04-14, 6,580,863",
                    "value": "6580863"
            }
        ]
        }
    }).render();
});

希望这会对您有所帮助。如需任何进一步的帮助@Chart Fiddle

【讨论】:

  • 感谢您的支持。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2011-05-28
  • 2019-06-10
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多