Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » How would I do this using the Birt Charting Engine API?
How would I do this using the Birt Charting Engine API? [message #192861] Wed, 27 September 2006 14:03 Go to next message
Eclipse UserFriend
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 18:14 Go to previous messageGo to next message
David Michonneau is currently offline David MichonneauFriend
Messages: 1145
Registered: July 2009
Senior Member
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 20:54 Go to previous messageGo to next message
Eclipse UserFriend
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 09:21 Go to previous message
David Michonneau is currently offline David MichonneauFriend
Messages: 1145
Registered: July 2009
Senior Member
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?
>>
>>
Previous Topic:Cannot access dataSet object
Next Topic:How to suppress BIRT Error during rendering time
Goto Forum:
  


Current Time: Wed Sep 18 14:02:43 GMT 2024

Powered by FUDForum. Page generated in 0.03621 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top