Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » BIRT Zoom Capability
BIRT Zoom Capability [message #637226] Thu, 04 November 2010 16:22 Go to next message
Aaron L is currently offline Aaron LFriend
Messages: 18
Registered: November 2009
Junior Member
I have an RCP application that uses the BIRT chart engine API to render an area chart to an SWT canvas.

I would like to implement a zoom feature that allows the user to click two points inside the chart to indicate the start and end x-axis values that should be used to rescale the chart.

My problem is that I can not figure out what chart component to add a Trigger to that will give me the x-axis value that is associated with a mouse click inside the chart.

I can add a trigger to the x axis, but in the callback method, there is no way to look up the x-axis value. I can get the x coordinate of the mouse click event, but I really need the actual x axis scale value. Additionally, adding a trigger the the area series is not sufficient, because then the user has to click on an actual area data point instead of being able to click just inside the chart itself.

Any help or ideas would be greatly appreciated.
Re: BIRT Zoom Capability [message #637260 is a reply to message #637226] Thu, 04 November 2010 17:58 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Have you seen this thread?

http://www.eclipse.org/forums/index.php?t=tree&th=197784 &S=79ed920c6a55a40ec081b62ea574af93

BTW I worked on an example BIRT report where I put a rubber band zoom
type trigger on the plot. Open the attached birt report and click on
the mouse once on the plot to start the band and then click again to
stop the band.

Jason


<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.21"
id="1">
<property name="comments">Copyright (c) 2007 &lt;&lt;Your Company
Name here>></property>
<property name="createdBy">Eclipse BIRT Designer Version
2.5.2.v20100208 Build &lt;2.5.2.v20100210-0630></property>
<html-property name="description">Creates a blank report with no
predefined content.</html-property>
<property name="units">in</property>
<text-property name="displayName">Blank Report</text-property>
<property name="iconFile">/templates/blank_report.gif</property>
<property name="layoutPreference">auto layout</property>
<parameters>
<scalar-parameter name="minScale" id="106">
<property name="valueType">static</property>
<property name="dataType">string</property>
<property name="distinct">true</property>
<simple-property-list name="defaultValue">
<value type="constant">70</value>
</simple-property-list>
<property name="paramType">simple</property>
<property name="controlType">text-box</property>
<structure name="format">
<property name="category">Unformatted</property>
</structure>
</scalar-parameter>
<scalar-parameter name="maxScale" id="107">
<property name="valueType">static</property>
<property name="dataType">string</property>
<property name="distinct">true</property>
<simple-property-list name="defaultValue">
<value type="constant">110</value>
</simple-property-list>
<property name="paramType">simple</property>
<property name="controlType">text-box</property>
<structure name="format">
<property name="category">Unformatted</property>
</structure>
</scalar-parameter>
</parameters>
<data-sources>
<oda-data-source
extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data Source"
id="6">
<property
name="odaDriverClass">org.eclipse.birt.report.data.oda.sampledb.Driver </property>
<property name="odaURL">jdbc:classicmodels:sampledb</property>
<property name="odaUser">ClassicModels</property>
</oda-data-source>
</data-sources>
<data-sets>
<oda-data-set
extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet "
name="Data Set" id="7">
<list-property name="columnHints">
<structure>
<property name="columnName">ORDERNUMBER</property>
<text-property
name="displayName">ORDERNUMBER</text-property>
</structure>
<structure>
<property name="columnName">PRODUCTCODE</property>
<text-property
name="displayName">PRODUCTCODE</text-property>
</structure>
<structure>
<property name="columnName">QUANTITYORDERED</property>
<text-property
name="displayName">QUANTITYORDERED</text-property>
</structure>
<structure>
<property name="columnName">PRICEEACH</property>
<text-property
name="displayName">PRICEEACH</text-property>
</structure>
<structure>
<property name="columnName">ORDERLINENUMBER</property>
<text-property
name="displayName">ORDERLINENUMBER</text-property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">ORDERNUMBER</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRODUCTCODE</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">QUANTITYORDERED</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">PRICEEACH</property>
<property name="dataType">float</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">ORDERLINENUMBER</property>
<property name="dataType">integer</property>
</structure>
</list-property>
</structure>
<property name="dataSource">Data Source</property>
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">ORDERNUMBER</property>
<property name="nativeName">ORDERNUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRODUCTCODE</property>
<property name="nativeName">PRODUCTCODE</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">QUANTITYORDERED</property>
<property name="nativeName">QUANTITYORDERED</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">PRICEEACH</property>
<property name="nativeName">PRICEEACH</property>
<property name="dataType">float</property>
<property name="nativeDataType">8</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">ORDERLINENUMBER</property>
<property name="nativeName">ORDERLINENUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">5</property>
</structure>
</list-property>
<xml-property name="queryText"><![CDATA[select *
from orderdetails]]></xml-property>
<xml-property name="designerValues"><![CDATA[<?xml
version="1.0" encoding="UTF-8"?>
<model:DesignValues
xmlns:design="http://www.eclipse.org/datatools/connectivity/oda/design"
xmlns:model="http://www.eclipse.org/birt/report/model/adapter/odaModel">
<Version>1.0</Version>
<design:ResultSets derivedMetaData="true">
<design:resultSetDefinitions>
<design:resultSetColumns>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>ORDERNUMBER</design:name>
<design:position>1</design:position>
<design:nativeDataTypeCode>4</design:nativeDataTypeCode>
<design:precision>10</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>ORDERNUMBER</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>ORDERNUMBER</design:label>
<design:formattingHints>
<design:displaySize>11</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>PRODUCTCODE</design:name>
<design:position>2</design:position>
<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
<design:precision>15</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>PRODUCTCODE</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>PRODUCTCODE</design:label>
<design:formattingHints>
<design:displaySize>15</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>QUANTITYORDERED</design:name>
<design:position>3</design:position>
<design:nativeDataTypeCode>4</design:nativeDataTypeCode>
<design:precision>10</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>QUANTITYORDERED</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>QUANTITYORDERED</design:label>
<design:formattingHints>
<design:displaySize>11</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>PRICEEACH</design:name>
<design:position>4</design:position>
<design:nativeDataTypeCode>8</design:nativeDataTypeCode>
<design:precision>15</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>PRICEEACH</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>PRICEEACH</design:label>
<design:formattingHints>
<design:displaySize>22</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>ORDERLINENUMBER</design:name>
<design:position>5</design:position>
<design:nativeDataTypeCode>5</design:nativeDataTypeCode>
<design:precision>5</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>ORDERLINENUMBER</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>ORDERLINENUMBER</design:label>
<design:formattingHints>
<design:displaySize>6</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
</design:resultSetColumns>
</design:resultSetDefinitions>
</design:ResultSets>
</model:DesignValues>]]></xml-property>
</oda-data-set>
</data-sets>
<styles>
<style name="crosstab" id="4">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
<style name="crosstab-cell" id="5">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
<style name="detail" id="57">
<property name="backgroundColor">#BACAE2</property>
<property name="fontFamily">"Arial"</property>
<property name="fontSize">small</property>
<property name="paddingTop">0px</property>
<property name="paddingLeft">0px</property>
<property name="paddingBottom">0px</property>
<property name="paddingRight">0px</property>
</style>
<style name="headerfooter" id="58">
<property name="backgroundColor">#004080</property>
<property name="fontFamily">"Arial"</property>
<property name="fontSize">small</property>
<property name="fontWeight">bold</property>
<property name="color">#FFFFFF</property>
</style>
<style name="groupheader" id="59">
<property name="backgroundColor">#0080FF</property>
<property name="fontFamily">"Arial"</property>
<property name="fontSize">small</property>
<property name="fontWeight">bold</property>
<property name="color">#FFFFFF</property>
</style>
<style name="myrb" id="67">
<property name="backgroundAttachment">fixed</property>
<property name="backgroundColor">#FF8080</property>
<property name="borderBottomStyle">dashed</property>
<property name="borderLeftStyle">dashed</property>
<property name="borderRightStyle">dashed</property>
<property name="borderTopStyle">dashed</property>
<property name="whiteSpace">pre</property>
<property name="display">inline</property>
</style>
<style name="NewStyle" id="77">
<property name="display">inline</property>
</style>
<style name="NewStyle1" id="93">
<property name="canShrink">true</property>
</style>
</styles>
<page-setup>
<simple-master-page name="Simple MasterPage" id="2">
<property name="topMargin">1in</property>
<property name="leftMargin">1.25in</property>
<property name="bottomMargin">1in</property>
<property name="rightMargin">1.25in</property>
</simple-master-page>
</page-setup>
<body>
<extended-item extensionName="Chart" name="NewChart" id="8">
<xml-property
name="xmlRepresentation"><![CDATA[<model:ChartWithAxes
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:attribute="http://www.birt.eclipse.org/ChartModelAttribute"
xmlns:data="http://www.birt.eclipse.org/ChartModelData"
xmlns:layout="http://www.birt.eclipse.org/ChartModelLayout"
xmlns:model="http://www.birt.eclipse.org/ChartModel"
xmlns:type="http://www.birt.eclipse.org/ChartModelType">
<Type>Bar Chart</Type>
<SubType>Side-by-side</SubType>
<Description>
<Value></Value>
<Font>
<Alignment/>
</Font>
</Description>
<Block>
<Children xsi:type="layout:TitleBlock">
<Bounds>
<Left>0.0</Left>
<Top>0.0</Top>
<Width>0.0</Width>
<Height>0.0</Height>
</Bounds>
<Insets>
<Top>3.0</Top>
<Left>3.0</Left>
<Bottom>3.0</Bottom>
<Right>3.0</Right>
</Insets>
<Row>-1</Row>
<Column>-1</Column>
<Rowspan>-1</Rowspan>
<Columnspan>-1</Columnspan>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Visible>true</Visible>
<Label>
<Caption>
<Value>Bar Chart Title</Value>
<Font>
<Size>16.0</Size>
<Bold>true</Bold>
<Alignment>
<horizontalAlignment>Center</horizontalAlignment>
<verticalAlignment>Center</verticalAlignment>
</Alignment>
</Font>
</Caption>
<Background xsi:type="attribute:ColorDefinition">
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>2.0</Left>
<Bottom>0.0</Bottom>
<Right>3.0</Right>
</Insets>
<Visible>true</Visible>
</Label>
</Children>
<Children xsi:type="layout:Plot">
<Bounds>
<Left>0.0</Left>
<Top>0.0</Top>
<Width>0.0</Width>
<Height>0.0</Height>
</Bounds>
<Insets>
<Top>3.0</Top>
<Left>3.0</Left>
<Bottom>3.0</Bottom>
<Right>3.0</Right>
</Insets>
<Row>-1</Row>
<Column>-1</Column>
<Rowspan>-1</Rowspan>
<Columnspan>-1</Columnspan>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Background xsi:type="attribute:ColorDefinition">
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Visible>true</Visible>
<HorizontalSpacing>5</HorizontalSpacing>
<VerticalSpacing>5</VerticalSpacing>
<ClientArea>
<Background xsi:type="attribute:ColorDefinition">
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>0</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>0.0</Left>
<Bottom>0.0</Bottom>
<Right>0.0</Right>
</Insets>
</ClientArea>
</Children>
<Children xsi:type="layout:Legend">
<Bounds>
<Left>0.0</Left>
<Top>0.0</Top>
<Width>0.0</Width>
<Height>0.0</Height>
</Bounds>
<Insets>
<Top>3.0</Top>
<Left>3.0</Left>
<Bottom>3.0</Bottom>
<Right>3.0</Right>
</Insets>
<Row>-1</Row>
<Column>-1</Column>
<Rowspan>-1</Rowspan>
<Columnspan>-1</Columnspan>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Visible>true</Visible>
<Triggers>
<Condition>onmouseover</Condition>
<Action>
<Type>Show_Tooltip</Type>
<Value xsi:type="attribute:TooltipValue">
<Text>mouseover</Text>
<Delay>200</Delay>
</Value>
</Action>
</Triggers>
<Triggers>
<Condition>onclick</Condition>
<Action>
<Type>Highlight</Type>
<Value xsi:type="attribute:SeriesValue">
<Name></Name>
</Value>
</Action>
</Triggers>
<ClientArea>
<Outline>
<Style>Solid</Style>
<Thickness>0</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Insets>
<Top>2.0</Top>
<Left>2.0</Left>
<Bottom>2.0</Bottom>
<Right>2.0</Right>
</Insets>
</ClientArea>
<Text>
<Value></Value>
<Font>
<Alignment/>
</Font>
</Text>
<Orientation>Vertical</Orientation>
<Direction>Top_Bottom</Direction>
<Separator>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>true</Visible>
</Separator>
<Position>Right</Position>
<ItemType>Categories</ItemType>
<Title>
<Caption>
<Value>dfsdf</Value>
<Font>
<Alignment/>
</Font>
</Caption>
<Background xsi:type="attribute:ColorDefinition">
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>2.0</Left>
<Bottom>0.0</Bottom>
<Right>3.0</Right>
</Insets>
<Visible>true</Visible>
</Title>
<TitlePosition>Above</TitlePosition>
<ShowValue>true</ShowValue>
</Children>
<Bounds>
<Left>0.0</Left>
<Top>0.0</Top>
<Width>442.49999999759996</Width>
<Height>246.7499999976</Height>
</Bounds>
<Insets>
<Top>3.0</Top>
<Left>3.0</Left>
<Bottom>3.0</Bottom>
<Right>3.0</Right>
</Insets>
<Row>-1</Row>
<Column>-1</Column>
<Rowspan>-1</Rowspan>
<Columnspan>-1</Columnspan>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>true</Visible>
</Outline>
<Visible>true</Visible>
<Triggers>
<Condition>onclick</Condition>
<Action>
<Type>Invoke_Script</Type>
<Value xsi:type="attribute:ScriptValue">
<Script>startRubber(evt);</Script>
</Value>
</Action>
</Triggers>
<Triggers>
<Condition>onmousemove</Condition>
<Action>
<Type>Invoke_Script</Type>
<Value xsi:type="attribute:ScriptValue">
<Script></Script>
</Value>
</Action>
</Triggers>
<Triggers>
<Condition>onmousedown</Condition>
<Action>
<Type>Invoke_Script</Type>
<Value xsi:type="attribute:ScriptValue">
<Script>startRubber(evt);&#xD;
&#xD;
</Script>
</Value>
</Action>
</Triggers>
<Triggers>
<Condition>onmouseup</Condition>
<Action>
<Type>Invoke_Script</Type>
<Value xsi:type="attribute:ScriptValue">
<Script>stopRubber(evt); &#xD;
</Script>
</Value>
</Action>
</Triggers>
<Triggers>
<Condition>ondblclick</Condition>
<Action>
<Type>Invoke_Script</Type>
<Value xsi:type="attribute:ScriptValue">
<Script></Script>
</Value>
</Action>
</Triggers>
</Block>
<Dimension>Two_Dimensional</Dimension>
<Script>var topy=0;
var bottomy=0;
var scalemax=0;
var scalemin=9999999;

function beforeGeneration(chart, icsc)
{
importPackage( Packages.org.eclipse.birt.chart.model.data.impl );
xAxis = chart.getBaseAxes()[0];
yAxis = chart.getOrthogonalAxes( xAxis, true)[0]
yscale = yAxis.getScale();
yscale.setMin(
NumberDataElementImpl.create(icsc.getExternalContext().getSc riptable().getParameterValue(&quot;minScale&quot;))
);
yscale.setMax(
NumberDataElementImpl.create(icsc.getExternalContext().getSc riptable().getParameterValue(&quot;maxScale&quot;))
);
yAxis.setScale(yscale);

}

function beforeDrawAxisLabel( axis, label, icsc )
{
importPackage(Packages.org.eclipse.birt.chart.model.attribut e);
importPackage( Packages.java.lang );
if (axis.getType() == AxisType.LINEAR_LITERAL){
var curr = parseFloat(label.getCaption().getValue());
if( curr > scalemax){
scalemax=curr;
}
if( curr &lt; scalemin){
scalemin=curr;
}
}
}


function beforeDrawBlock( block, icsc )
{
if( block.isPlot() ){
topy = block.getBounds().getTop()+50;
bottomy =
block.getBounds().getHeight()+block.getBounds().getTop()+30;
}
}


function afterRendering( gcs, icsc )
{
var slp = (scalemax-scalemin)/(bottomy-topy);

icsc.getExternalContext().getScriptable().setGlobalVariable( &quot;scaleSlope&quot;,slp);

icsc.getExternalContext().getScriptable().setGlobalVariable( &quot;scaleMin&quot;,scalemin);

icsc.getExternalContext().getScriptable().setGlobalVariable( &quot;scaleMinY&quot;,bottomy);
}
</Script>
<Units>Points</Units>
<SeriesThickness>10.0</SeriesThickness>
<SampleData>
<BaseSampleData>
<DataSetRepresentation>'A','B','C'</DataSetRepresentation>
</BaseSampleData>
<OrthogonalSampleData>
<DataSetRepresentation>5.0,4.0,12.0</DataSetRepresentation >
<SeriesDefinitionIndex>0</SeriesDefinitionIndex>
</OrthogonalSampleData>
<AncillarySampleData>
<DataSetRepresentation>Series 1</DataSetRepresentation>
</AncillarySampleData>
</SampleData>
<Interactivity>
<LegendBehavior>HighlightSerie</LegendBehavior>
</Interactivity>
<EmptyMessage>
<Caption>
<Value></Value>
<Font>
<Alignment/>
</Font>
</Caption>
<Background xsi:type="attribute:ColorDefinition">
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>2.0</Left>
<Bottom>0.0</Bottom>
<Right>3.0</Right>
</Insets>
<Visible>false</Visible>
</EmptyMessage>
<Axes>
<Type>Text</Type>
<Title>
<Caption>
<Value>X-Axis Title</Value>
<Font>
<Size>14.0</Size>
<Bold>true</Bold>
<Alignment>
<horizontalAlignment>Center</horizontalAlignment>
<verticalAlignment>Center</verticalAlignment>
</Alignment>
<Rotation>0.0</Rotation>
</Font>
</Caption>
<Background xsi:type="attribute:ColorDefinition">
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>2.0</Left>
<Bottom>0.0</Bottom>
<Right>3.0</Right>
</Insets>
<Visible>false</Visible>
</Title>
<TitlePosition>Below</TitlePosition>
<AssociatedAxes>
<Type>Linear</Type>
<Title>
<Caption>
<Value>Y-Axis Title</Value>
<Font>
<Size>14.0</Size>
<Bold>true</Bold>
<Alignment>
<horizontalAlignment>Center</horizontalAlignment>
<verticalAlignment>Center</verticalAlignment>
</Alignment>
<Rotation>90.0</Rotation>
</Font>
</Caption>
<Background xsi:type="attribute:ColorDefinition">
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>2.0</Left>
<Bottom>0.0</Bottom>
<Right>3.0</Right>
</Insets>
<Visible>false</Visible>
</Title>
<TitlePosition>Left</TitlePosition>
<SeriesDefinitions>
<Query>
<Definition></Definition>
</Query>
<SeriesPalette>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>80</Red>
<Green>166</Green>
<Blue>218</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>242</Red>
<Green>88</Green>
<Blue>106</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>232</Red>
<Green>172</Green>
<Blue>57</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>128</Red>
<Green>255</Green>
<Blue>128</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>64</Red>
<Green>128</Green>
<Blue>128</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>128</Red>
<Green>128</Green>
<Blue>192</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>170</Red>
<Green>85</Green>
<Blue>85</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>128</Red>
<Green>128</Green>
<Blue>0</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>192</Red>
<Green>192</Green>
<Blue>192</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>128</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>128</Red>
<Green>192</Green>
<Blue>128</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>7</Red>
<Green>146</Green>
<Blue>94</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>0</Red>
<Green>128</Green>
<Blue>255</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>255</Red>
<Green>128</Green>
<Blue>192</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>0</Red>
<Green>255</Green>
<Blue>255</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>255</Red>
<Green>128</Green>
<Blue>128</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>0</Red>
<Green>128</Green>
<Blue>192</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>128</Red>
<Green>128</Green>
<Blue>192</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>255</Red>
<Green>0</Green>
<Blue>255</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>128</Red>
<Green>64</Green>
<Blue>64</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>255</Red>
<Green>128</Green>
<Blue>64</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>80</Red>
<Green>240</Green>
<Blue>120</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>0</Red>
<Green>64</Green>
<Blue>128</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>128</Red>
<Green>0</Green>
<Blue>64</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>255</Red>
<Green>0</Green>
<Blue>128</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>128</Red>
<Green>128</Green>
<Blue>64</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>128</Red>
<Green>128</Green>
<Blue>128</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>255</Red>
<Green>128</Green>
<Blue>255</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>0</Red>
<Green>64</Green>
<Blue>0</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Entries>
<Entries xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>255</Red>
<Green>128</Green>
<Blue>0</Blue>
</Entries>
</SeriesPalette>
<Series xsi:type="type:BarSeries">
<Visible>true</Visible>
<Label>
<Caption>
<Value></Value>
<Font>
<Alignment/>
</Font>
</Caption>
<Background xsi:type="attribute:ColorDefinition">
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>2.0</Left>
<Bottom>0.0</Bottom>
<Right>3.0</Right>
</Insets>
<Visible>true</Visible>
</Label>
<DataDefinition>
<Definition>row[&quot;QUANTITYORDERED&quot;]</Definition >
</DataDefinition>
<SeriesIdentifier></SeriesIdentifier>
<DataPoint>
<Components>
<Type>Orthogonal_Value</Type>
</Components>
<Separator>, </Separator>
</DataPoint>
<LabelPosition>Outside</LabelPosition>
<Stacked>false</Stacked>
<Triggers>
<Condition>onmouseover</Condition>
<Action>
<Type>Show_Tooltip</Type>
<Value xsi:type="attribute:TooltipValue">
<Text>row[&quot;PRODUCTCODE&quot;] + &quot;, &quot;
+row[&quot;QUANTITYORDERED&quot;]</Text>
<Delay>200</Delay>
</Value>
</Action>
</Triggers>
<Riser>Rectangle</Riser>
</Series>
<Grouping>
<Enabled>false</Enabled>
<GroupingInterval>2.0</GroupingInterval>
<GroupType>Text</GroupType>
<AggregateExpression>Sum</AggregateExpression>
</Grouping>
<Sorting>Ascending</Sorting>
</SeriesDefinitions>
<Orientation>Vertical</Orientation>
<LineAttributes>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>true</Visible>
</LineAttributes>
<Label>
<Caption>
<Value></Value>
<Font>
<Alignment/>
</Font>
</Caption>
<Background xsi:type="attribute:ColorDefinition">
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>2.0</Left>
<Bottom>0.0</Bottom>
<Right>3.0</Right>
</Insets>
<Visible>true</Visible>
</Label>
<FormatSpecifier xsi:type="attribute:NumberFormatSpecifier">
<Prefix></Prefix>
<Suffix></Suffix>
<FractionDigits>2</FractionDigits>
</FormatSpecifier>
<LabelPosition>Left</LabelPosition>
<MajorGrid>
<LineAttributes>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>196</Red>
<Green>196</Green>
<Blue>196</Blue>
</Color>
<Visible>false</Visible>
</LineAttributes>
<TickStyle>Across</TickStyle>
<TickAttributes>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>196</Red>
<Green>196</Green>
<Blue>196</Blue>
</Color>
<Vis
Re: BIRT Zoom Capability [message #637272 is a reply to message #637260] Thu, 04 November 2010 19:03 Go to previous messageGo to next message
Aaron L is currently offline Aaron LFriend
Messages: 18
Registered: November 2009
Junior Member
Thanks for your response Jason.

I'm assuming your "zoom example" was created in the report designer. Is there any way to replicate this for a report generated and displayed in an RCP application using the chart engine API.

From your example it looks like you have mouse click triggers added to the plot that cause a script to run. I'm not quite sure how the scripting part works or how this would be done in an RCP application.
Re: BIRT Zoom Capability [message #637460 is a reply to message #637272] Fri, 05 November 2010 15:12 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

I think it could be done but you will notice I use a couple of the
elements in the report like the band and the script tag. Another
approach to this may be to see what is available in SWT. I know there
are some examples in the source that show changing the chart types on
drop down in an SWT app. That may be a good starting place.

Jason

On 11/4/2010 3:03 PM, WhoDat wrote:
> Thanks for your response Jason.
>
> I'm assuming your "zoom example" was created in the report designer. Is
> there any way to replicate this for a report generated and displayed in
> an RCP application using the chart engine API.
>
> From your example it looks like you have mouse click triggers added to
> the plot that cause a script to run. I'm not quite sure how the
> scripting part works or how this would be done in an RCP application.
Re: BIRT Zoom Capability [message #695684 is a reply to message #637260] Tue, 12 July 2011 10:16 Go to previous messageGo to next message
Patrick VALLET is currently offline Patrick VALLETFriend
Messages: 2
Registered: January 2011
Junior Member
Hi Jason,
I also wanted to know if it was possible to create chart with zoom capacity when I scroll the mouse for example on a chart but I could not find it by myself on the Birt viewer. I red the topic on that and you talked about an example attached that I guess could helped me but I could not find out where is the attached file. Could you please repost it or send it to me by mail?
I tried to copy paste the xml text what is on the forum on a job test but I guess it's more complicate than that.

BIRT Designer Version 2.6.1.v20100902
Eclipse version="3.2.22

Thank you for your help if something is possible.
Regards,

Patrick V
Re: BIRT Zoom Capability [message #696293 is a reply to message #695684] Wed, 13 July 2011 16:08 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

This is one I started but did not finish. Left click on the y axis and
then move the mouse up or down. It is no where close to finished though.

Jason

On 7/12/2011 6:16 AM, Patrick VALLET wrote:
> Hi Jason,
> I also wanted to know if it was possible to create chart with zoom
> capacity when I scroll the mouse for example on a chart but I could not
> find it by myself on the Birt viewer. I red the topic on that and you
> talked about an example attached that I guess could helped me but I
> could not find out where is the attached file. Could you please repost
> it or send it to me by mail?
> I tried to copy paste the xml text what is on the forum on a job test
> but I guess it's more complicate than that.
>
> BIRT Designer Version 2.6.1.v20100902
> Eclipse version="3.2.22
>
> Thank you for your help if something is possible.
> Regards,
>
> Patrick V
Re: BIRT Zoom Capability [message #696307 is a reply to message #696293] Wed, 13 July 2011 16:50 Go to previous message
Patrick VALLET is currently offline Patrick VALLETFriend
Messages: 2
Registered: January 2011
Junior Member
Many thanks. I'll work on that and will let you know the results as soon as it works.
Regards
Patrick V
Previous Topic:Problem while generating Birt Reports on Unix Server
Next Topic:Where to plugin new IDocArchiveReader
Goto Forum:
  


Current Time: Fri Apr 19 03:13:23 GMT 2024

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

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

Back to the top