ASE Home Page Products Download Purchase Support About ASE
ChartDirector General
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  bargraph plotting problem
Posted by premila on Nov-16-2010 18:55
Attachments:
Hi Peter,

My scenario :

I have a tablelayout with 10 rows populated through forloop. I would like to add bar graph(single bar) for each row.

The problem is the bar graph width goes on increasing.

The code is available below for reference,

            XYChart c = new XYChart(415, 27);
           c.setPlotArea(1, 1, 415, 27, c.linearGradientColor(1, 1, 60, 280, 0XFAF1FA, 0xffeeff), -1, 0xffffff, 0xffffff);
          c.setBackground(0XFAF1FA, 0xffeeff);

            c.xAxis().setColors(Chart.Transparent);
            c.yAxis().setColors(Chart.Transparent);
            c.swapXY();
            c.yAxis().setLinearScale(Chart.NoValue, 500);
            c.yAxis().setRounding(true, false);
            BarLayer Layer = c.addBarLayer(data, 0x58A8C3);
            Layer.setBarWidth(15);


Can u throw some light on this.

Regards,
Prami
bargraph.PNG

  Re: bargraph plotting problem
Posted by Peter Kwan on Nov-17-2010 02:36
Hi premila,

If your attached chart is created by using multiple XYCharts, I suspect part of the XYChart is being blocked or clipped by other things in your code. For example, you may have put the chart images in a container that clipped away the bottom part of the bars, or the bottom part of the bars may be blocked by the container under them. If this is the case, please modify your code, so that the chart image is not clipped or blocked.

Hope this can help.

Regards
Peter Kwan