public override void DataBind() { if (!Visible) // don't databind if we aren't going to use it. { return; } DataTable table = getTableFromObject(DataSource); //Normalize RaceLabelNames: Replace Old Race Labels with New labels: ReplaceOldRaceLabelsWithNew(table); //backwards compatibility if (SeriesColumnName == ColumnPicker.CommonGraphNames.OrgSchoolTypeLabel.ToString() && !table.Columns.Contains(ColumnPicker.CommonGraphNames.OrgSchoolTypeLabel.ToString())) { SeriesColumnName = "OrgLevelLabel"; } SaveOriginalAxisAndSeriesLabels(table); table = SortDataSource(table); table = TransformDataSource(table); GraphBarChart.OverrideSeriesColumnNames(table, customSeriesLabelsMap); GraphBarChart.ReplaceColumnValues(table, LabelColumnName, OverrideAxisXLabels); DataSource = table; base.DataBind(); GraphHorizBarChart.SetSeriesColors(this.Series, SeriesColors); SetSeriesPatterns(this.Series, OverrideSeriesPatterns); }
public override void DataBind() { DataTable tbl = GraphBarChart.getTableFromObject(DataSource); //Normalize RaceLabelNames: Replace Old Race Labels with New labels: GraphBarChart.ReplaceOldRaceLabelsWithNew(tbl); tbl = TransformDataSource(tbl); GraphBarChart.OverrideSeriesColumnNames(tbl, customSeriesLabelsMap); DataSource = (object)tbl; Height = (int)(Height.Value + tbl.Rows.Count * ((tbl.Rows.Count * AutoHeightIncreaseFactor > 35000) ? 1 : AutoHeightIncreaseFactor)); //multiply rowcount by 20, unless it will exceed the graph's Height Property Maximum (~35,000); base.DataBind(); if (!String.IsNullOrEmpty(YAxisSuffix)) { SetYAxisSuffix(YAxisSuffix); } }