I am creating a bar chart in iOS application. The values to be plotted are very big and their text value is also very big.
Following is my code to bind series values:
Code: Select all
Steema.TeeChart.Styles.Bar SeriesBar = new Steema.TeeChart.Styles.Bar(chart.Chart);
SeriesBar.Title ="Quantity";
SeriesBar.Marks.Visible = false;
SeriesBar.Add(1644,"1.2 TSI Active");
SeriesBar.Add(1240,"1.2 TSI Ambition");
SeriesBar.Add(2506,"1.2 TSI Elegance");
SeriesBar.Add(2351,"1.4 TSI Active");
SeriesBar.Add(3385,"1.4 TSI Combi Ambition");
SeriesBar.Add(2867,"1.4 TSI Elegance");
SeriesBar.Add(1230,"1.6 TDI Combi Ambition");
SeriesBar.Add(3718,"1.6 TDI Limosine Active");
SeriesBar.Add(1935,"1.8 TSI Combi Ambition");
SeriesBar.Add(1190,"1.8 TSI Limosine Active");
SeriesBar.Add(2147,"1.8 TSI Limosine Ambition");
SeriesBar.Add(6888,"1.8 TSI Limosine Elegance");
SeriesBar.Add(4987,"2.0 TDI Active");
SeriesBar.Add(1928,"2.0 TDI Ambition");
SeriesBar.Add(742,"2.0 TDI Combi Ambition");
SeriesBar.Add(1455,"2.0 TDI Combi L&K");
SeriesBar.Add(3068,"2.0 TDI Elegance");
SeriesBar.Add(763,"2.0 TDI Limosine Ambition");
SeriesBar.Add(5092,"2.0 TDI Limosine Elegance");
SeriesBar.Add(3613,"3.6 VG Combi Ambition");
SeriesBar.Add(2270,"3.6 VG Combi Elegance");
SeriesBar.Add(7843,"A5 Sportback");
SeriesBar.Add(8565,"A6 Avant");
SeriesBar.Add(7724,"A6 Limousine");
SeriesBar.Add(3784,"Comfortline");
chart.Series.Add(SeriesBar);
Code: Select all
chart.Legend.Transparent = true;
chart.Legend.Visible = true;
chart.Legend.Alignment = LegendAlignments.Bottom;
chart.Legend.Symbol.WidthUnits = LegendSymbolSize.Pixels;
chart.Legend.Symbol.Width = 10;
chart.Legend.Symbol.Position = LegendSymbolPosition.Left;
chart.Legend.TextAlign = MonoTouch.CoreText.CTTextAlignment.Justified;
chart.Legend.TextSymbolGap = 0;
chart.Legend.ColumnWidthAuto = false;
int[] LegendColWidth = {53,53};
chart.Legend.ColumnWidths = LegendColWidth;
Steema.TeeChart.Drawing.ChartFont LegendFont = new Steema.TeeChart.Drawing.ChartFont();
LegendFont.Size = 5;
chart.Legend.Font = LegendFont;
chart.Legend.HorizMargin = 0;
chart.Legend.VertMargin=0;
chart.Legend.Left = 0;
chart.Legend.VertSpacing = 0;
the gap between the symbol and text of the legend.
We want to display legend in two columns.
Please let us know how can we improve the display of the legend with large values.