Page 1 of 1

eMultiBar

Posted: Wed Oct 21, 2009 5:35 pm
by 9532689
Hi,
I don't know if it's possible, but I would like to have two different eMultiBar (two Series Side by Side and two Series Side by Side but in front on two last series) ?


Thank You

Re: eMultiBar

Posted: Thu Oct 22, 2009 11:01 am
by yeray
Hi Rousseau,

I'm afraid that's not possible right now. I've added it to the wish list to be implemented in future releases (TV52014506).
In the meanwhile, I've found that using a subcharttool you could get something that you may consider acceptable:

Code: Select all

uses series, TeeSubChart, Math;

procedure TForm1.FormCreate(Sender: TObject);
var i, j: Integer;
    SubChart: TSubChartTool;
    Chart2: TChart;
begin
  SubChart := Chart1.Tools.Add(TSubChartTool.Create(self)) as TSubChartTool;
  Chart2 := SubChart.Charts.AddChart();
  Chart2.Parent:=SubChart.ParentChart;
  Chart1.Legend.Visible := false;
  Chart2.Axes.Visible := false;

  for i:=0 to 1 do
  begin
    Chart1.AddSeries(TBarSeries.Create(self));
    Chart2.AddSeries(TBarSeries.Create(self));
    for j:=0 to 4 do
    begin
      Chart1[i].Add(Round(random*50+75));
      Chart2[i].Add(Round(random*50+25));
      Chart1[i].Marks.Visible := false;
      Chart2[i].Marks.Visible := false;
    end;
  end;

  Chart1.Draw;
  Chart2.CustomChartRect := true;
  Chart2.ChartRect := Chart1.ChartRect;
  Chart2.Draw;
  Chart2.Axes.Left.AutomaticMaximum := false;
  Chart1.Axes.Left.AutomaticMaximum := false;
  Chart2.Axes.Left.Maximum := Max(Chart1.Axes.Left.Maximum,Chart2.Axes.Left.Maximum);
  Chart1.Axes.Left.Maximum := Chart2.Axes.Left.Maximum;
end;

Re: eMultiBar

Posted: Thu Oct 22, 2009 1:55 pm
by 9532689
Hi,

Thanks for your answer but I'm not familiar with that it seem be C#. Have you two Chart ? I can't find TSubChartTool in the help, what is it ?

Re: eMultiBar

Posted: Thu Oct 22, 2009 2:47 pm
by yeray
Hi Rousseau,

Excuse me, this tool is not enough functional in ActiveX to allow the viability of this workaround. The problem is that this tool is accessible at design time but its specific properties (asSubChart) aren't still accessible at runtime and this is essential to use it for the suggested workaround. This is a known problem already in the wish list and I've just incremented its priority.

SubChart tool allows you to create a new chart inside a created chart. You can see it at the demo at What's New ?\Welcome !\New Chart Tools\SubCharts

Re: eMultiBar

Posted: Thu Oct 22, 2009 2:49 pm
by 9532689
Ok Thank you.....