Пример #1
0
        public override string EvaluateModelTemplate(int counter)
        {
            string templateName            = "colDivTempParallelCoordinates" + counter.ToString();
            ParallelCoordinatesModel model = this.ChartModel as ParallelCoordinatesModel;
            string colString = ChartsUtilities.EvaluateTemplate(model, "Mandrill_d3.ParallelCoordinatesChart.parallelCoordinatesChart.html", templateName);

            return(colString);
        }
Пример #2
0
        public override void CreateChartModel(int counter)
        {
            ParallelCoordinatesModel model = new ParallelCoordinatesModel();

            model.Width     = this.Style.Width;
            model.Height    = this.Style.Height;
            model.LineColor = ChartsUtilities.ColorToHexString(this.Style.LineColor);
            model.Data      = this.Data.ToJsonString();
            model.DivId     = "div" + counter.ToString();
            model.Margins   = this.Style.Margins;

            // set grid address
            model.GridRow    = this.Style.GridRow;
            model.GridColumn = this.Style.GridColumn;

            // always round up for the grid size so chart is smaller then container
            model.SizeX = (int)System.Math.Ceiling(this.Style.Width / 100d);
            model.SizeY = (int)System.Math.Ceiling(this.Style.Height / 100d);

            this.ChartModel = model;
        }