You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-user@incubator.apache.org by Sven Wagner <sv...@googlemail.com> on 2007/03/28 07:23:32 UTC

Problems using Charts

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;
    }
}

Re: Problems using Charts

Posted by venkata guddanti <ve...@gmail.com>.
Hi Swen,

I had a quick look a this issue and looks like the "_locale" is not being
sent to the client. Currently the chart is being rendered on the client side
and it is using the locale to format numbers ('.' vs ','). The provided
sample works since the editor binding(with table) is somehow forcing the
"_locale" to be sent down to the client.

The pie chart is displaying currently since it is not displaying any labels
(it only displays the labels on mouseover). In future we need to label the
pie and the funnel charts as well.

I will investigate a fix.

Regards,
Venkata

On 3/29/07, Sven Wagner <sv...@googlemail.com> wrote:
>
> Hi Venkata,
>
> thanks for the hint. Unfortunately it doesn't solve my problem. I added
> the
> functions to myChartModel Class but the  problem remains  the same.  Am I
> using the tag right? This works fine:
>
> <tr:chart id="myChart" value="#{chart.value}" type="pie"></tr:chart>
>
> This shows a blank space though the border of the box is visible.
>
> <tr:chart id="myChart" value="#{chart.value}"
> type="verticalBar"></tr:chart>
>
> Would be cool if I could make it work. It's an impressing component.
>
> Sven
>
>
> 2007/3/29, venkata guddanti <ve...@gmail.com>:
> >
> > 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 <sv...@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;
> > >     }
> > > }
> > >
> >
>

Re: Problems using Charts

Posted by Sven Wagner <sv...@googlemail.com>.
Hi Venkata,

thanks for the hint. Unfortunately it doesn't solve my problem. I added the
functions to myChartModel Class but the  problem remains  the same.  Am I
using the tag right? This works fine:

<tr:chart id="myChart" value="#{chart.value}" type="pie"></tr:chart>

This shows a blank space though the border of the box is visible.

<tr:chart id="myChart" value="#{chart.value}" type="verticalBar"></tr:chart>

Would be cool if I could make it work. It's an impressing component.

Sven


2007/3/29, venkata guddanti <ve...@gmail.com>:
>
> 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 <sv...@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;
> >     }
> > }
> >
>

Re: Problems using Charts

Posted by Sven Wagner <sv...@stud.tu-darmstadt.de>.
Hi Venkata,

thanks for the help. It works fine now. Excellent component. Everyone around
here loved it.

Thanks again,

Sven

2007/3/30, venkata guddanti <ve...@gmail.com>:
>
> I entered JIRA issue for this and provided a patch that should fix this
> problem. Here is a link to the issue:
>
> https://issues.apache.org/jira/browse/ADFFACES-430
>
> Regards,
> Venkata
>
> On 3/29/07, venkata guddanti <ve...@gmail.com> wrote:
> >
> > Hi Matthias,
> >
> > Please see my earlier response to Swen. We were not sending the locale
> > information to the client.
> >
> > Yes there is another potential bug in the sense that the most of the
> > charts need maximum and minimum values to render the scaled values. If
> the
> > chartModel does not provide any values, we should be computing the
> minimum
> > value (80% of the minimum of all the values) and maximum value(120% of
> the
> > maximum of values). I will provide a patch for this soon. But in the
> > meantime developers can provide the minimum and maximum so that they can
> > control the desired scaling.
> >
> > --Venkata
> >
> > On 3/29/07, Matthias Wessendorf <ma...@apache.org> wrote:
> > >
> > > HEy Venk,
> > >
> > > are you saying the comp. has a bug ?
> > >
> > > -M
> > >
> > > On 3/29/07, venkata guddanti <ve...@gmail.com> wrote:
> > > > 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;
> > > > >     }
> > > > > }
> > > > >
> > > >
> > >
> > >
> > > --
> > > Matthias Wessendorf
> > > http://tinyurl.com/fmywh
> > >
> > > further stuff:
> > > blog: http://jroller.com/page/mwessendorf
> > > mail: mwessendorf-at-gmail-dot-com
> > >
> >
> >
>

Re: Problems using Charts

Posted by venkata guddanti <ve...@gmail.com>.
I entered JIRA issue for this and provided a patch that should fix this
problem. Here is a link to the issue:

https://issues.apache.org/jira/browse/ADFFACES-430

Regards,
Venkata

On 3/29/07, venkata guddanti <ve...@gmail.com> wrote:
>
> Hi Matthias,
>
> Please see my earlier response to Swen. We were not sending the locale
> information to the client.
>
> Yes there is another potential bug in the sense that the most of the
> charts need maximum and minimum values to render the scaled values. If the
> chartModel does not provide any values, we should be computing the minimum
> value (80% of the minimum of all the values) and maximum value(120% of the
> maximum of values). I will provide a patch for this soon. But in the
> meantime developers can provide the minimum and maximum so that they can
> control the desired scaling.
>
> --Venkata
>
> On 3/29/07, Matthias Wessendorf <ma...@apache.org> wrote:
> >
> > HEy Venk,
> >
> > are you saying the comp. has a bug ?
> >
> > -M
> >
> > On 3/29/07, venkata guddanti <ve...@gmail.com> wrote:
> > > 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;
> > > >     }
> > > > }
> > > >
> > >
> >
> >
> > --
> > Matthias Wessendorf
> > http://tinyurl.com/fmywh
> >
> > further stuff:
> > blog: http://jroller.com/page/mwessendorf
> > mail: mwessendorf-at-gmail-dot-com
> >
>
>

Re: Problems using Charts

Posted by venkata guddanti <ve...@gmail.com>.
Hi Matthias,

Please see my earlier response to Swen. We were not sending the locale
information to the client.

Yes there is another potential bug in the sense that the most of the charts
need maximum and minimum values to render the scaled values. If the
chartModel does not provide any values, we should be computing the minimum
value (80% of the minimum of all the values) and maximum value(120% of the
maximum of values). I will provide a patch for this soon. But in the
meantime developers can provide the minimum and maximum so that they can
control the desired scaling.

--Venkata

On 3/29/07, Matthias Wessendorf <ma...@apache.org> wrote:
>
> HEy Venk,
>
> are you saying the comp. has a bug ?
>
> -M
>
> On 3/29/07, venkata guddanti <ve...@gmail.com> wrote:
> > 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 <sv...@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;
> > >     }
> > > }
> > >
> >
>
>
> --
> Matthias Wessendorf
> http://tinyurl.com/fmywh
>
> further stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
>

Re: Problems using Charts

Posted by Matthias Wessendorf <ma...@apache.org>.
HEy Venk,

are you saying the comp. has a bug ?

-M

On 3/29/07, venkata guddanti <ve...@gmail.com> wrote:
> 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 <sv...@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;
> >     }
> > }
> >
>


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Re: Problems using Charts

Posted by venkata guddanti <ve...@gmail.com>.
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 <sv...@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;
>     }
> }
>