| Home » Archived » BIRT » How would I do this using the Birt Charting Engine API?
 Goto Forum:| 
| How would I do this using the Birt Charting Engine API? [message #192861] | Wed, 27 September 2006 10:03  |  | 
| Eclipse User  |  |  |  |  | Originally posted by: mrmikeolson.yahoo.ca 
 I would like to have the bar labels in a chart to be the series name,
 but the mouseover tooltips to be the value of the bar.
 
 By default, the label is the value, but I was told I could change the
 label the series name like so:
 
 bs1.getDataPoint( ).getComponents( ).clear( );
 bs1.getDataPoint( ).getComponents( ).add( DataPointComponentImpl.create(
 DataPointComponentType.SERIES_VALUE_LITERAL, null ) );
 
 This works fine, however, when I create my tooltips, I do it like so:
 
 bs1.getTriggers( ).add(
 TriggerImpl.create(
 TriggerCondition.ONMOUSEOVER_LITERAL,
 ActionImpl.create(
 ActionType.SHOW_TOOLTIP_LITERAL,
 TooltipValueImpl.create(500,
 bs1.getLabel().getCaption().getValue() )
 )
 )
 );
 
 Which, of course gives me the series name as a tooltip instead of a
 value.  How would I put the bar value in the tooltip instead?
 |  |  |  |  | 
| Re: How would I do this using the Birt Charting Engine API? [message #192942 is a reply to message #192861] | Wed, 27 September 2006 14:14   |  | 
| Eclipse User  |  |  |  |  | Just leave the tooltip value empty. It should automatically pick up the value.
 
 Thanks,
 
 David
 
 "molson" <mrmikeolson@yahoo.ca> wrote in message
 news:efe0ar$jga$1@utils.eclipse.org...
 >I would like to have the bar labels in a chart to be the series name, but
 >the mouseover tooltips to be the value of the bar.
 >
 > By default, the label is the value, but I was told I could change the
 > label the series name like so:
 >
 > bs1.getDataPoint( ).getComponents( ).clear( );
 > bs1.getDataPoint( ).getComponents( ).add( DataPointComponentImpl.create(
 > DataPointComponentType.SERIES_VALUE_LITERAL, null ) );
 >
 > This works fine, however, when I create my tooltips, I do it like so:
 >
 > bs1.getTriggers( ).add(
 >     TriggerImpl.create(
 >             TriggerCondition.ONMOUSEOVER_LITERAL,
 >             ActionImpl.create(
 >                     ActionType.SHOW_TOOLTIP_LITERAL,
 >                         TooltipValueImpl.create(500,
 > bs1.getLabel().getCaption().getValue() )
 >             )
 >     )
 > );
 >
 > Which, of course gives me the series name as a tooltip instead of a value.
 > How would I put the bar value in the tooltip instead?
 |  |  |  |  | 
| Re: How would I do this using the Birt Charting Engine API? [message #192981 is a reply to message #192942] | Wed, 27 September 2006 16:54   |  | 
| Eclipse User  |  |  |  |  | Originally posted by: mrmikeolson.yahoo.ca 
 If I do this:
 
 bs1.getTriggers( ).add(
 TriggerImpl.create(
 TriggerCondition.ONMOUSEOVER_LITERAL,
 ActionImpl.create(
 ActionType.SHOW_TOOLTIP_LITERAL,
 TooltipValueImpl.create(500, "" )
 )
 )
 );
 
 I still get the series name as the tooltip, not the bar value.
 
 Am I missing something here?
 
 David Michonneau wrote:
 > Just leave the tooltip value empty. It should automatically pick up the
 > value.
 >
 > Thanks,
 >
 > David
 >
 > "molson" <mrmikeolson@yahoo.ca> wrote in message
 > news:efe0ar$jga$1@utils.eclipse.org...
 >
 >>I would like to have the bar labels in a chart to be the series name, but
 >>the mouseover tooltips to be the value of the bar.
 >>
 >>By default, the label is the value, but I was told I could change the
 >>label the series name like so:
 >>
 >>bs1.getDataPoint( ).getComponents( ).clear( );
 >>bs1.getDataPoint( ).getComponents( ).add( DataPointComponentImpl.create(
 >>DataPointComponentType.SERIES_VALUE_LITERAL, null ) );
 >>
 >>This works fine, however, when I create my tooltips, I do it like so:
 >>
 >>bs1.getTriggers( ).add(
 >>    TriggerImpl.create(
 >>            TriggerCondition.ONMOUSEOVER_LITERAL,
 >>            ActionImpl.create(
 >>                    ActionType.SHOW_TOOLTIP_LITERAL,
 >>                        TooltipValueImpl.create(500,
 >>bs1.getLabel().getCaption().getValue() )
 >>            )
 >>    )
 >>);
 >>
 >>Which, of course gives me the series name as a tooltip instead of a value.
 >>How would I put the bar value in the tooltip instead?
 >
 >
 >
 |  |  |  |  | 
| Re: How would I do this using the Birt Charting Engine API? [message #193092 is a reply to message #192981] | Thu, 28 September 2006 05:21  |  | 
| Eclipse User  |  |  |  |  | Try with null instead of "", it should normally work. 
 Thanks,
 
 David
 
 "molson" <mrmikeolson@yahoo.ca> wrote in message
 news:efeoe2$ifg$1@utils.eclipse.org...
 > If I do this:
 >
 > bs1.getTriggers( ).add(
 >     TriggerImpl.create(
 >             TriggerCondition.ONMOUSEOVER_LITERAL,
 >             ActionImpl.create(
 >                     ActionType.SHOW_TOOLTIP_LITERAL,
 >                         TooltipValueImpl.create(500, "" )
 >             )
 >     )
 > );
 >
 > I still get the series name as the tooltip, not the bar value.
 >
 > Am I missing something here?
 >
 > David Michonneau wrote:
 >> Just leave the tooltip value empty. It should automatically pick up the
 >> value.
 >>
 >> Thanks,
 >>
 >> David
 >>
 >> "molson" <mrmikeolson@yahoo.ca> wrote in message
 >> news:efe0ar$jga$1@utils.eclipse.org...
 >>
 >>>I would like to have the bar labels in a chart to be the series name, but
 >>>the mouseover tooltips to be the value of the bar.
 >>>
 >>>By default, the label is the value, but I was told I could change the
 >>>label the series name like so:
 >>>
 >>>bs1.getDataPoint( ).getComponents( ).clear( );
 >>>bs1.getDataPoint( ).getComponents( ).add(
 >>>DataPointComponentImpl.create(
 >>>DataPointComponentType.SERIES_VALUE_LITERAL, null ) );
 >>>
 >>>This works fine, however, when I create my tooltips, I do it like so:
 >>>
 >>>bs1.getTriggers( ).add(
 >>>    TriggerImpl.create(
 >>>            TriggerCondition.ONMOUSEOVER_LITERAL,
 >>>            ActionImpl.create(
 >>>                    ActionType.SHOW_TOOLTIP_LITERAL,
 >>>                        TooltipValueImpl.create(500,
 >>> bs1.getLabel().getCaption().getValue() )
 >>>            )
 >>>    )
 >>>);
 >>>
 >>>Which, of course gives me the series name as a tooltip instead of a
 >>>value. How would I put the bar value in the tooltip instead?
 >>
 >>
 |  |  |  | 
 
 
 Current Time: Thu Oct 30 20:59:10 EDT 2025 
 Powered by FUDForum . Page generated in 0.03484 seconds |