示例#1
0
        /// <summary>
        /// チャートスクリプト取得
        /// </summary>
        public ChartResult GetChartResult(IChartDto chartDto)
        {
            var targetScript = Flotr2ScriptResource.PieChartScriptTemplete;

            PieChartDto = (PieChartDto)chartDto;

            //ファンクション設定
            targetScript = InjectParameter(targetScript, FunctionParameterKey.FunctionName, PieChartDto.FunctionName);

            //コンテナー設定
            targetScript = InjectScriptParameterByChartContainer(targetScript, PieChartDto.PieChartContainer);

            //プロパティ設定
            targetScript = InjectParameterToProperties(targetScript, PieChartDto.PieChartProperties);

            return new ChartResult()
                    {
                        ChartScript = targetScript,
                        ChartContainerSettings = new ChartContainerSettings()
                                                    {
                                                        ChartContainerId = PieChartDto.PieChartContainer.ViewContainerId,
                                                        ChartContainerClass =  PieChartDto.PieChartContainer.ViewContainerClass
                                                    }
                    };
        }
示例#2
0
        /// <summary>
        /// チャートスクリプト取得
        /// </summary>
        public ChartResult GetChartResult(IChartDto chartDto)
        {
            var targetScript = Flotr2ScriptResource.FormationChartScriptTemplete;
            FormationChartDto = (FormationChartDto)chartDto;

            // コンテナの設定
            targetScript = InjectScriptContainer(targetScript, FormationChartDto);

            // 共通部分の情報
            var partialScript = Flotr2ScriptPartsResource.FormationSharedTemplete;
            //プロパティ設定
            partialScript = InjectParameterToProperties(partialScript, FormationChartDto.FormationChartProperties.SharedProperties);

            // ターゲットスクリプトへの反映
            targetScript = InjectParameter(targetScript, Flotr2Const.FormationSheredTemplete, partialScript);

            return new ChartResult()
            {
                ChartScript = targetScript,
                ChartContainerSettings = new ChartContainerSettings()
                {
                    ChartContainerId = FormationChartDto.FormationChartContainer.ViewContainerId,
                    ChartContainerClass = FormationChartDto.FormationChartContainer.ViewContainerClass
                }
            };
        }
示例#3
0
        public ChartResult GetChartResult(IChartDto chartDto)
        {
            var targetScript = Flotr2ScriptResource.BarChartScriptTemplete;

            return new ChartResult() { ChartScript = targetScript, ChartContainerSettings = new ChartContainerSettings() };
        }
示例#4
0
 public ChartResult GetChartResult(IChartDto chartDto, Flotr2Const.ChartType Type)
 {
     return GetChartService(Type).GetChartResult(chartDto);
 }