【问题标题】:Retaining the AnimationDuration property of the Shield UI ASP.NET Chart保留 Shield UI ASP.NET 图表的 AnimationDuration 属性
【发布时间】:2013-09-09 13:44:21
【问题描述】:

我的 Shield UI ASP.NET 图表存在以下问题。我将其动画的持续时间设置为 7500。我使用以下属性: AnimationDuration="7500"

这可以在我的代码中看到:

<shield:ShieldChart ID="ShieldChart2" runat="server" Width="463px" Height="331px"
                OnTakeDataSource="ShieldChart2_TakeDataSource" 
    CssClass="chart" AnimationDuration="7500">

但是,当我在代码中重新创建图表时,动画会更快——我假设它是默认的。这是我的一些代码:

    function PointSelect(args) {
        document.getElementById("QTR").value = args.point.x;
        var detailData = performanceData[args.point.x].values,
        detailChartElement = $('#' + "<%=ShieldChart2.ClientID%>"),
        detailChart = detailChartElement.swidget(),
        initialOptions = detailChart.initialOptions,
        headerText = args.point.name + ' Sales by product';
        detailChart.destroy();
        detailChartElement.shieldChart($.extend(initialOptions, {
            Visible:true,
            primaryHeader: {
                text: headerText
            },
            slicedOffset: 0,
            dataSeries: [
            {
                seriesType: 'pie',
                addToLegend: true,
                enablePointSelection: true,
                collectionAlias: 'Q Data',
                data: detailData
            }
            ],
        }));

实际上是什么初始化了图表……

【问题讨论】:

    标签: asp.net shieldui


    【解决方案1】:

    从您的代码中可以看出,您正在重新创建图表,这意味着初始设置没有被考虑在内。因此,您需要使用 seriesSettings 属性并相应地设置其值:

    seriesSettings: {
       pie: {
           applyAnimation: {
               duration: 7500           
           }
       }
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多