incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "venkata guddanti" <venkata.gudda...@gmail.com>
Subject Re: Problems using Charts
Date Wed, 28 Mar 2007 22:57:34 GMT
Hi Sven,

There is a bug in the chart rendering where it is expecting a maxYValue and
minYValue. The following will fix chart:

        @Override
        public Double getMaxYValue()
        {
            return 200000.0;
        }

        @Override
        public Double getMinYValue()
        {
          return 0.0;
        }

Per documentation you do not need to specify these. The min value should
default to 0.0 and max value should be 120% of the max of the yValues. Can
you please log a JIRA issue for this? I will submit a patch.

--Venkata

On 3/28/07, Sven Wagner <svenwd@googlemail.com> wrote:
>
> Hello,
>
> I'm trying to use the tr:chart component. The demo works fine as it is,
> but
> when I try using my own classes with the demo data, it only shows pie
> charts
> (and funnel charts). for all other types I get an empty space. I have
> tried
> simply using the demo as it is and not rendering the the table which has
> the
> same effect. Can anyone help?
>
> Thanks,
>
> Sven
>
> P.S. Sorry if I spam you with this problem, I tried sending it twice
> already.
>
>
> These are my classes:
>
> public class MyChartModel extends ChartModel{
>
>     @Override
>     public List<String> getGroupLabels() {
>         // TODO Auto-generated method stub
>         return Arrays.asList(new String[]{"June", "July", "August",
> "September","October"});
>     }
>
>     @Override
>     public List<String> getSeriesLabels() {
>         // TODO Auto-generated method stub
>         return Arrays.asList(new String[]{"Previous", "Target",
> "Actual"});
>     }
>
>     @Override
>     public List<List<Double>> getYValues() {
>         ArrayList<List<Double>> _chartYValues = new
> ArrayList<List<Double>>();
>           _chartYValues.add(Arrays.asList(new Double[]{135235.0, 155535.0,
> 141725.0}));
>           _chartYValues.add( Arrays.asList(new Double[]{106765., 131725.,
> 127868.}));
>           _chartYValues.add(Arrays.asList(new Double[]{108456., 119326.,
> 139326.}));
>           _chartYValues.add(Arrays.asList(new Double[]{136765., 147265.,
> 184349.}));
>           _chartYValues.add(Arrays.asList(new Double[]{107868., 113968.,
> 174349.}));
>           return _chartYValues;
>     }
>
> }
>
> ----------------
> public class ChartBean {
>     MyChartModel value=new MyChartModel();
>
>     public ChartModel getValue(){
>         return value;
>     }
> }
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message