Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » How to show series labels only for the last value
How to show series labels only for the last value [message #640855] Tue, 23 November 2010 10:46 Go to next message
Helmut Neubauer is currently offline Helmut NeubauerFriend
Messages: 54
Registered: July 2009
Member
Hello,

I'm using a scatter chart with several series. Now I want the chart to
display series labels only for the last value of each series.

I think, it must be possible with beforeDrawDataPointLabel( dph, label,
icsc ), but I don't know how. Perhaps you can help me?

Thanks,
Helmut
Re: How to show series labels only for the last value [message #640979 is a reply to message #640855] Tue, 23 November 2010 18:02 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

This definitely doable. Attached is an example that uses some script to
do exactly what you want. The chart has two series and the script only
shows the last label for one of the series, the other series all labels
are shown. It should be a simpler script to do on all series.

Just change the scripts from

dpSize = 0

labelDrawSeries = false;

function afterDataSetFilled( series, dataSet, icsc )
{
var list = dataSet.getValues();
dpSize = list.length;

}

function beforeDrawDataPointLabel( dph, label, icsc )
{
if( labelDrawSeries ){
if( dph.getIndex() == dpSize-1 ){
label.setVisible(true);
}else{
label.setVisible(false);
}
}
}


function beforeDrawSeries( series, isr, icsc )
{

if( series.getSeriesIdentifier() == "series1" ){
labelDrawSeries=true;
}else{
labelDrawSeries=false;
}
}

function afterDrawSeries( series, isr, icsc )
{
labelDrawSeries=false
}


to


dpSize = 0

function afterDataSetFilled( series, dataSet, icsc )
{
var list = dataSet.getValues();
dpSize = list.length;

}

function beforeDrawDataPointLabel( dph, label, icsc )
{
if( dph.getIndex() == dpSize-1 ){
label.setVisible(true);
}else{
label.setVisible(false);
}
}


Jason


<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.17"
id="1">
<property name="createdBy">Eclipse BIRT Designer Version
2.3.2.r232_20090202 Build &lt;2.3.2.v20090218-0730></property>
<property name="units">in</property>
<property name="comments">Copyright (c) 2007 &lt;&lt;Your Company
Name here>>

</property>
<html-property name="description">Creates a blank report with no
predefined content.</html-property>
<text-property name="displayName">Blank Report</text-property>
<property name="iconFile">/templates/blank_report.gif</property>
<data-sources>
<script-data-source name="Data Source" id="5"/>
</data-sources>
<data-sets>
<script-data-set name="Data Set" id="6">
<list-property name="resultSetHints">
<structure>
<property name="position">1</property>
<property name="name">category</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">series1</property>
<property name="dataType">float</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">series2</property>
<property name="dataType">float</property>
</structure>
</list-property>
<list-property name="columnHints">
<structure>
<property name="columnName">category</property>
</structure>
<structure>
<property name="columnName">series1</property>
</structure>
<structure>
<property name="columnName">series2</property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">category</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">series1</property>
<property name="dataType">float</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">series2</property>
<property name="dataType">float</property>
</structure>
</list-property>
</structure>
<property name="dataSource">Data Source</property>
<method name="open"><![CDATA[i = 0;

sourcedata = new Array( new Array(3),
new Array(3),
new Array(3),
new Array(3),
new Array(3));
sourcedata[0][0] = "Item1";
sourcedata[0][1] = 25;
sourcedata[0][2] = 10;

sourcedata[1][0] = "Item2";
sourcedata[1][1] = 35;
sourcedata[1][2] = 33;

sourcedata[2][0] = "Item3";
sourcedata[2][1] = 15;
sourcedata[2][2] = 25;]]></method>
<method name="fetch"><![CDATA[if ( i < 3 )
{
row["category"] = sourcedata[i][0];
row["series1"] = sourcedata[i][1];
row["series2"]= sourcedata[i][2];
i++;
return true;
}
return false;]]></method>
</script-data-set>
</data-sets>
<page-setup>
<simple-master-page name="Simple MasterPage" id="2"/>
</page-setup>
<body>
<extended-item extensionName="Chart" name="Overlay Line Chart"
id="4">
<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>Line Chart</Type>
<SubType>Overlay</SubType>
<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>Overlay Line Chart</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>
<Visible>true</Visible>
<HorizontalSpacing>5</HorizontalSpacing>
<VerticalSpacing>5</VerticalSpacing>
<ClientArea>
<Background xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>225</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>false</Visible>
<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>Series</ItemType>
<Title>
<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>false</Visible>
</Title>
<TitlePosition>Above</TitlePosition>
</Children>
<Bounds>
<Left>0.0</Left>
<Top>0.0</Top>
<Width>432.0</Width>
<Height>216.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>255</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Visible>true</Visible>
</Block>
<Dimension>Two_Dimensional</Dimension>
<Script>dpSize = 0

labelDrawSeries = false;

function afterDataSetFilled( series, dataSet, icsc )
{
var list = dataSet.getValues();
dpSize = list.length;

}

function beforeDrawDataPointLabel( dph, label, icsc )
{
if( labelDrawSeries ){
if( dph.getIndex() == dpSize-1 ){
label.setVisible(true);
}else{
label.setVisible(false);
}
}
}


function beforeDrawSeries( series, isr, icsc )
{

if( series.getSeriesIdentifier() == &quot;series1&quot; ){
labelDrawSeries=true;
}else{
labelDrawSeries=false;
}
}

function afterDrawSeries( series, isr, icsc )
{
labelDrawSeries=false
}
</Script>
<Units>Points</Units>
<SeriesThickness>10.0</SeriesThickness>
<GridColumnCount>1</GridColumnCount>
<SampleData>
<BaseSampleData>
<DataSetRepresentation>'A','B','C','D','E'</DataSetRepresentation >
</BaseSampleData>
<OrthogonalSampleData>
<DataSetRepresentation>5.0,4.0,12.0</DataSetRepresentation >
<SeriesDefinitionIndex>0</SeriesDefinitionIndex>
</OrthogonalSampleData>
<OrthogonalSampleData>
<DataSetRepresentation>10.0,8.0,24.0</DataSetRepresentation >
<SeriesDefinitionIndex>1</SeriesDefinitionIndex>
</OrthogonalSampleData>
</SampleData>
<Interactivity>
<Enable>true</Enable>
<LegendBehavior>None</LegendBehavior>
</Interactivity>
<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>
</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>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>
</SeriesPalette>
<Series xsi:type="type:LineSeries">
<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;series1&quot;]</Definition>
</DataDefinition>
<SeriesIdentifier>series1</SeriesIdentifier>
<DataPoint>
<Components>
<Type>Orthogonal_Value</Type>
</Components>
<Separator>, </Separator>
</DataPoint>
<LabelPosition>Above</LabelPosition>
<Stacked>false</Stacked>
<Translucent>false</Translucent>
<Markers>
<Type>Triangle</Type>
<Size>4</Size>
<Visible>true</Visible>
</Markers>
<LineAttributes>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>249</Red>
<Green>225</Green>
<Blue>191</Blue>
</Color>
<Visible>true</Visible>
</LineAttributes>
<PaletteLineColor>false</PaletteLineColor>
<Curve>false</Curve>
<ShadowColor>
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</ShadowColor>
<ConnectMissingValue>true</ConnectMissingValue>
</Series>
<Grouping>
<Enabled>false</Enabled>
<GroupingInterval>2.0</GroupingInterval>
<GroupType>Text</GroupType>
<AggregateExpression>Sum</AggregateExpression>
</Grouping>
<Sorting>Ascending</Sorting>
</SeriesDefinitions>
<SeriesDefinitions>
<Query>
<Definition></Definition>
</Query>
<SeriesPalette>
<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>232</Red>
<Green>172</Green>
<Blue>57</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;series2&quot;]</Definition>
</DataDefinition>
<SeriesIdentifier>series2</SeriesIdentifier>
<DataPoint>
<Components>
<Type>Orthogonal_Value</Type>
</Components>
<Separator>, </Separator>
</DataPoint>
<LabelPosition>Outside</LabelPosition>
<Stacked>false</Stacked>
<Riser>Rectangle</Riser>
</Series>
<Grouping>
<Enabled>false</Enabled>
<GroupingInterval>2.0</GroupingInterval>
<GroupType>Text</GroupType>
<AggregateExpression>Sum</AggregateExpression>
</Grouping>
</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>
<LabelPosition>Left</LabelPosition>
<Staggered>false</Staggered>
<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>Left</TickStyle>
<TickAttributes>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>196</Red>
<Green>196</Green>
<Blue>196</Blue>
</Color>
<Visible>true</Visible>
</TickAttributes>
</MajorGrid>
<MinorGrid>
<LineAttributes>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>225</Red>
<Green>225</Green>
<Blue>225</Blue>
</Color>
<Visible>false</Visible>
</LineAttributes>
<TickStyle>Across</TickStyle>
<TickAttributes>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>225</Red>
<Green>225</Green>
<Blue>225</Blue>
</Color>
<Visible>false</Visible>
</TickAttributes>
</MinorGrid>
<Scale>
<MinorGridsPerUnit>5</MinorGridsPerUnit>
</Scale>
<Origin>
<Type>Min</Type>
<Value xsi:type="data:NumberDataElement">
<Value>0.0</Value>
</Value>
</Origin>
<PrimaryAxis>true</PrimaryAxis>
<Percent>false</Percent>
</AssociatedAxes>
<SeriesDefinitions>
<Query>
<Definition></Definition>
</Query>
<SeriesPalette>
<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>
</SeriesPalette>
<Series>
<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>false</Visible>
</Label>
<DataDefinition>
<Definition>row[&quot;category&quot;]</Definition>
</DataDefinition>
<SeriesIdentifier></SeriesIdentifier>
<DataPoint>
<Components>
<Type>Orthogonal_Value</Type>
</Components>
<Separator>, </Separator>
</DataPoint>
<LabelPosition>Outside</LabelPosition>
<Stacked>false</Stacked>
</Series>
<Grouping>
<Enabled>false</Enabled>
<GroupingInterval>2.0</GroupingInterval>
<GroupType>Text</GroupType>
<AggregateExpression>Sum</AggregateExpression>
</Grouping>
</SeriesDefinitions>
<Orientation>Horizontal</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>
<LabelPosition>Below</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>Below</TickStyle>
<TickAttributes>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>196</Red>
<Green>196</Green>
<Blue>196</Blue>
</Color>
<Visible>true</Visible>
</TickAttributes>
</MajorGrid>
<MinorGrid>
<LineAttributes>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>225</Red>
<Green>225</Green>
<Blue>225</Blue>
</Color>
<Visible>false</Visible>
</LineAttributes>
<TickStyle>Across</TickStyle>
<TickAttributes>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>225</Red>
<Green>225</Green>
<Blue>225</Blue>
</Color>
<Visible>false</Visible>
</TickAttributes>
</MinorGrid>
<Scale>
<MinorGridsPerUnit>5</MinorGridsPerUnit>
<ShowOutside>false</ShowOutside>
</Scale>
<Origin>
<Type>Min</Type>
<Value xsi:type="data:NumberDataElement">
<Value>0.0</Value>
</Value>
</Origin>
<PrimaryAxis>true</PrimaryAxis>
<CategoryAxis>false</CategoryAxis>
<Percent>false</Percent>
</Axes>
<Orientation>Vertical</Orientation>
<Rotation/>
</model:ChartWithAxes>
]]></xml-property>
<property name="outputFormat">SVG</property>
<property name="marginTop">0pt</property>
<property name="dataSet">Data Set</property>
<property name="height">3in</property>
<property name="width">6in</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">category</property>
<expression
name="expression">dataSetRow["category"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">series1</property>
<expression
name="expression">dataSetRow["series1"]</expression>
<property name="dataType">float</property>
</structure>
<structure>
<property name="name">series2</property>
<expression
name="expression">dataSetRow["series2"]</expression>
<property name="dataType">float</property>
</structure>
</list-property>
</extended-item>
</body>
</report>


On 11/23/2010 5:46 AM, Helmut Neubauer wrote:
> Hello,
>
> I'm using a scatter chart with several series. Now I want the chart to
> display series labels only for the last value of each series.
>
> I think, it must be possible with beforeDrawDataPointLabel( dph, label,
> icsc ), but I don't know how. Perhaps you can help me?
>
> Thanks,
> Helmut
Re: How to show series labels only for the last value [message #641165 is a reply to message #640979] Wed, 24 November 2010 13:18 Go to previous messageGo to next message
Helmut Neubauer is currently offline Helmut NeubauerFriend
Messages: 54
Registered: July 2009
Member
Hi Jason,

thanks for your answer. I was able to adapt the script to do what I
want. Perhaps you can tell, how to append this last value also to the
series legend label?

Thanks,
Helmut


Am 23.11.2010 19:02, schrieb Jason Weathersby:
> This definitely doable. Attached is an example that uses some script to
> do exactly what you want. The chart has two series and the script only
> shows the last label for one of the series, the other series all labels
> are shown. It should be a simpler script to do on all series.
>
> Just change the scripts from
>
> dpSize = 0
>
> labelDrawSeries = false;
>
> function afterDataSetFilled( series, dataSet, icsc )
> {
> var list = dataSet.getValues();
> dpSize = list.length;
>
> }
>
> function beforeDrawDataPointLabel( dph, label, icsc )
> {
> if( labelDrawSeries ){
> if( dph.getIndex() == dpSize-1 ){
> label.setVisible(true);
> }else{
> label.setVisible(false);
> }
> }
> }
>
>
> function beforeDrawSeries( series, isr, icsc )
> {
>
> if( series.getSeriesIdentifier() == "series1" ){
> labelDrawSeries=true;
> }else{
> labelDrawSeries=false;
> }
> }
>
> function afterDrawSeries( series, isr, icsc )
> {
> labelDrawSeries=false
> }
>
>
> to
>
>
> dpSize = 0
>
> function afterDataSetFilled( series, dataSet, icsc )
> {
> var list = dataSet.getValues();
> dpSize = list.length;
>
> }
>
> function beforeDrawDataPointLabel( dph, label, icsc )
> {
> if( dph.getIndex() == dpSize-1 ){
> label.setVisible(true);
> }else{
> label.setVisible(false);
> }
> }
>
>
> Jason
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.17"
> id="1">
> <property name="createdBy">Eclipse BIRT Designer Version
> 2.3.2.r232_20090202 Build &lt;2.3.2.v20090218-0730></property>
> <property name="units">in</property>
> <property name="comments">Copyright (c) 2007 &lt;&lt;Your Company
> Name here>>
>
> </property>
> <html-property name="description">Creates a blank report with no
> predefined content.</html-property>
> <text-property name="displayName">Blank Report</text-property>
> <property name="iconFile">/templates/blank_report.gif</property>
> <data-sources>
> <script-data-source name="Data Source" id="5"/>
> </data-sources>
> <data-sets>
> <script-data-set name="Data Set" id="6">
> <list-property name="resultSetHints">
> <structure>
> <property name="position">1</property>
> <property name="name">category</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">series1</property>
> <property name="dataType">float</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">series2</property>
> <property name="dataType">float</property>
> </structure>
> </list-property>
> <list-property name="columnHints">
> <structure>
> <property name="columnName">category</property>
> </structure>
> <structure>
> <property name="columnName">series1</property>
> </structure>
> <structure>
> <property name="columnName">series2</property>
> </structure>
> </list-property>
> <structure name="cachedMetaData">
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">category</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">series1</property>
> <property name="dataType">float</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">series2</property>
> <property name="dataType">float</property>
> </structure>
> </list-property>
> </structure>
> <property name="dataSource">Data Source</property>
> <method name="open"><![CDATA[i = 0;
>
> sourcedata = new Array( new Array(3),
> new Array(3),
> new Array(3),
> new Array(3),
> new Array(3));
> sourcedata[0][0] = "Item1";
> sourcedata[0][1] = 25;
> sourcedata[0][2] = 10;
>
> sourcedata[1][0] = "Item2";
> sourcedata[1][1] = 35;
> sourcedata[1][2] = 33;
>
> sourcedata[2][0] = "Item3";
> sourcedata[2][1] = 15;
> sourcedata[2][2] = 25;]]></method>
> <method name="fetch"><![CDATA[if ( i < 3 )
> {
> row["category"] = sourcedata[i][0];
> row["series1"] = sourcedata[i][1];
> row["series2"]= sourcedata[i][2];
> i++;
> return true;
> }
> return false;]]></method>
> </script-data-set>
> </data-sets>
> <page-setup>
> <simple-master-page name="Simple MasterPage" id="2"/>
> </page-setup>
> <body>
> <extended-item extensionName="Chart" name="Overlay Line Chart"
> id="4">
> <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>Line Chart</Type>
> <SubType>Overlay</SubType>
> <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>Overlay Line Chart</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>
> <Visible>true</Visible>
> <HorizontalSpacing>5</HorizontalSpacing>
> <VerticalSpacing>5</VerticalSpacing>
> <ClientArea>
> <Background xsi:type="attribute:ColorDefinition">
> <Transparency>255</Transparency>
> <Red>255</Red>
> <Green>255</Green>
> <Blue>225</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>false</Visible>
> <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>Series</ItemType>
> <Title>
> <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>false</Visible>
> </Title>
> <TitlePosition>Above</TitlePosition>
> </Children>
> <Bounds>
> <Left>0.0</Left>
> <Top>0.0</Top>
> <Width>432.0</Width>
> <Height>216.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>255</Transparency>
> <Red>255</Red>
> <Green>255</Green>
> <Blue>255</Blue>
> </Background>
> <Visible>true</Visible>
> </Block>
> <Dimension>Two_Dimensional</Dimension>
> <Script>dpSize = 0
>
> labelDrawSeries = false;
>
> function afterDataSetFilled( series, dataSet, icsc )
> {
> var list = dataSet.getValues();
> dpSize = list.length;
>
> }
>
> function beforeDrawDataPointLabel( dph, label, icsc )
> {
> if( labelDrawSeries ){
> if( dph.getIndex() == dpSize-1 ){
> label.setVisible(true);
> }else{
> label.setVisible(false);
> }
> }
> }
>
>
> function beforeDrawSeries( series, isr, icsc )
> {
>
> if( series.getSeriesIdentifier() == &quot;series1&quot; ){
> labelDrawSeries=true;
> }else{
> labelDrawSeries=false;
> }
> }
>
> function afterDrawSeries( series, isr, icsc )
> {
> labelDrawSeries=false
> }
> </Script>
> <Units>Points</Units>
> <SeriesThickness>10.0</SeriesThickness>
> <GridColumnCount>1</GridColumnCount>
> <SampleData>
> <BaseSampleData>
> <DataSetRepresentation>'A','B','C','D','E'</DataSetRepresentation >
> </BaseSampleData>
> <OrthogonalSampleData>
> <DataSetRepresentation>5.0,4.0,12.0</DataSetRepresentation >
> <SeriesDefinitionIndex>0</SeriesDefinitionIndex>
> </OrthogonalSampleData>
> <OrthogonalSampleData>
> <DataSetRepresentation>10.0,8.0,24.0</DataSetRepresentation >
> <SeriesDefinitionIndex>1</SeriesDefinitionIndex>
> </OrthogonalSampleData>
> </SampleData>
> <Interactivity>
> <Enable>true</Enable>
> <LegendBehavior>None</LegendBehavior>
> </Interactivity>
> <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>
> </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>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>
> </SeriesPalette>
> <Series xsi:type="type:LineSeries">
> <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;series1&quot;]</Definition>
> </DataDefinition>
> <SeriesIdentifier>series1</SeriesIdentifier>
> <DataPoint>
> <Components>
> <Type>Orthogonal_Value</Type>
> </Components>
> <Separator>, </Separator>
> </DataPoint>
> <LabelPosition>Above</LabelPosition>
> <Stacked>false</Stacked>
> <Translucent>false</Translucent>
> <Markers>
> <Type>Triangle</Type>
> <Size>4</Size>
> <Visible>true</Visible>
> </Markers>
> <LineAttributes>
> <Style>Solid</Style>
> <Thickness>1</Thickness>
> <Color>
> <Transparency>255</Transparency>
> <Red>249</Red>
> <Green>225</Green>
> <Blue>191</Blue>
> </Color>
> <Visible>true</Visible>
> </LineAttributes>
> <PaletteLineColor>false</PaletteLineColor>
> <Curve>false</Curve>
> <ShadowColor>
> <Transparency>0</Transparency>
> <Red>255</Red>
> <Green>255</Green>
> <Blue>255</Blue>
> </ShadowColor>
> <ConnectMissingValue>true</ConnectMissingValue>
> </Series>
> <Grouping>
> <Enabled>false</Enabled>
> <GroupingInterval>2.0</GroupingInterval>
> <GroupType>Text</GroupType>
> <AggregateExpression>Sum</AggregateExpression>
> </Grouping>
> <Sorting>Ascending</Sorting>
> </SeriesDefinitions>
> <SeriesDefinitions>
> <Query>
> <Definition></Definition>
> </Query>
> <SeriesPalette>
> <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>232</Red>
> <Green>172</Green>
> <Blue>57</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;series2&quot;]</Definition>
> </DataDefinition>
> <SeriesIdentifier>series2</SeriesIdentifier>
> <DataPoint>
> <Components>
> <Type>Orthogonal_Value</Type>
> </Components>
> <Separator>, </Separator>
> </DataPoint>
> <LabelPosition>Outside</LabelPosition>
> <Stacked>false</Stacked>
> <Riser>Rectangle</Riser>
> </Series>
> <Grouping>
> <Enabled>false</Enabled>
> <GroupingInterval>2.0</GroupingInterval>
> <GroupType>Text</GroupType>
> <AggregateExpression>Sum</AggregateExpression>
> </Grouping>
> </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>
> <LabelPosition>Left</LabelPosition>
> <Staggered>false</Staggered>
> <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>Left</TickStyle>
> <TickAttributes>
> <Style>Solid</Style>
> <Thickness>1</Thickness>
> <Color>
> <Transparency>255</Transparency>
> <Red>196</Red>
> <Green>196</Green>
> <Blue>196</Blue>
> </Color>
> <Visible>true</Visible>
> </TickAttributes>
> </MajorGrid>
> <MinorGrid>
> <LineAttributes>
> <Style>Solid</Style>
> <Thickness>1</Thickness>
> <Color>
> <Transparency>255</Transparency>
> <Red>225</Red>
> <Green>225</Green>
> <Blue>225</Blue>
> </Color>
> <Visible>false</Visible>
> </LineAttributes>
> <TickStyle>Across</TickStyle>
> <TickAttributes>
> <Style>Solid</Style>
> <Thickness>1</Thickness>
> <Color>
> <Transparency>255</Transparency>
> <Red>225</Red>
> <Green>225</Green>
> <Blue>225</Blue>
> </Color>
> <Visible>false</Visible>
> </TickAttributes>
> </MinorGrid>
> <Scale>
> <MinorGridsPerUnit>5</MinorGridsPerUnit>
> </Scale>
> <Origin>
> <Type>Min</Type>
> <Value xsi:type="data:NumberDataElement">
> <Value>0.0</Value>
> </Value>
> </Origin>
> <PrimaryAxis>true</PrimaryAxis>
> <Percent>false</Percent>
> </AssociatedAxes>
> <SeriesDefinitions>
> <Query>
> <Definition></Definition>
> </Query>
> <SeriesPalette>
> <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>
> </SeriesPalette>
> <Series>
> <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>false</Visible>
> </Label>
> <DataDefinition>
> <Definition>row[&quot;category&quot;]</Definition>
> </DataDefinition>
> <SeriesIdentifier></SeriesIdentifier>
> <DataPoint>
> <Components>
> <Type>Orthogonal_Value</Type>
> </Components>
> <Separator>, </Separator>
> </DataPoint>
> <LabelPosition>Outside</LabelPosition>
> <Stacked>false</Stacked>
> </Series>
> <Grouping>
> <Enabled>false</Enabled>
> <GroupingInterval>2.0</GroupingInterval>
> <GroupType>Text</GroupType>
> <AggregateExpression>Sum</AggregateExpression>
> </Grouping>
> </SeriesDefinitions>
> <Orientation>Horizontal</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>
> <LabelPosition>Below</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>Below</TickStyle>
> <TickAttributes>
> <Style>Solid</Style>
> <Thickness>1</Thickness>
> <Color>
> <Transparency>255</Transparency>
> <Red>196</Red>
> <Green>196</Green>
> <Blue>196</Blue>
> </Color>
> <Visible>true</Visible>
> </TickAttributes>
> </MajorGrid>
> <MinorGrid>
> <LineAttributes>
> <Style>Solid</Style>
> <Thickness>1</Thickness>
> <Color>
> <Transparency>255</Transparency>
> <Red>225</Red>
> <Green>225</Green>
> <Blue>225</Blue>
> </Color>
> <Visible>false</Visible>
> </LineAttributes>
> <TickStyle>Across</TickStyle>
> <TickAttributes>
> <Style>Solid</Style>
> <Thickness>1</Thickness>
> <Color>
> <Transparency>255</Transparency>
> <Red>225</Red>
> <Green>225</Green>
> <Blue>225</Blue>
> </Color>
> <Visible>false</Visible>
> </TickAttributes>
> </MinorGrid>
> <Scale>
> <MinorGridsPerUnit>5</MinorGridsPerUnit>
> <ShowOutside>false</ShowOutside>
> </Scale>
> <Origin>
> <Type>Min</Type>
> <Value xsi:type="data:NumberDataElement">
> <Value>0.0</Value>
> </Value>
> </Origin>
> <PrimaryAxis>true</PrimaryAxis>
> <CategoryAxis>false</CategoryAxis>
> <Percent>false</Percent>
> </Axes>
> <Orientation>Vertical</Orientation>
> <Rotation/>
> </model:ChartWithAxes>
> ]]></xml-property>
> <property name="outputFormat">SVG</property>
> <property name="marginTop">0pt</property>
> <property name="dataSet">Data Set</property>
> <property name="height">3in</property>
> <property name="width">6in</property>
> <list-property name="boundDataColumns">
> <structure>
> <property name="name">category</property>
> <expression
> name="expression">dataSetRow["category"]</expression>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="name">series1</property>
> <expression
> name="expression">dataSetRow["series1"]</expression>
> <property name="dataType">float</property>
> </structure>
> <structure>
> <property name="name">series2</property>
> <expression
> name="expression">dataSetRow["series2"]</expression>
> <property name="dataType">float</property>
> </structure>
> </list-property>
> </extended-item>
> </body>
> </report>
>
>
> On 11/23/2010 5:46 AM, Helmut Neubauer wrote:
>> Hello,
>>
>> I'm using a scatter chart with several series. Now I want the chart to
>> display series labels only for the last value of each series.
>>
>> I think, it must be possible with beforeDrawDataPointLabel( dph, label,
>> icsc ), but I don't know how. Perhaps you can help me?
>>
>> Thanks,
>> Helmut
>
Re: How to show series labels only for the last value [message #641231 is a reply to message #641165] Wed, 24 November 2010 15:21 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Create a global variable (outside of any of the chart scripts) for each
series:

addtolegendseries1 = ""
addtolegendseries2 = ""

Then in the beforeDrawDataPointLabel do something like:

if( dph.getIndex() == dpSize-1){
if( dph.getSeriesDisplayValue() == "series1" ){
addtolegendseries1 =label.getCaption().getValue();
}else{
addtolegendseries2 =label.getCaption().getValue();
}
}

Then in the beforeDrawLegendItem add the value like:
function beforeDrawLegendItem( lerh, bounds, icsc )
{
var mylegendval =lerh.getLabel().getCaption().getValue();
if( mylegendval == "series1" ){
lerh.getLabel().getCaption().setValue(mylegendval+"-"+addtolegendseries1);
}else{
lerh.getLabel().getCaption().setValue(mylegendval+"-"+addtolegendseries2);
}
}

Jason

On 11/24/2010 8:18 AM, Helmut Neubauer wrote:
> Hi Jason,
>
> thanks for your answer. I was able to adapt the script to do what I
> want. Perhaps you can tell, how to append this last value also to the
> series legend label?
>
> Thanks,
> Helmut
>
>
> Am 23.11.2010 19:02, schrieb Jason Weathersby:
>> This definitely doable. Attached is an example that uses some script to
>> do exactly what you want. The chart has two series and the script only
>> shows the last label for one of the series, the other series all labels
>> are shown. It should be a simpler script to do on all series.
>>
>> Just change the scripts from
>>
>> dpSize = 0
>>
>> labelDrawSeries = false;
>>
>> function afterDataSetFilled( series, dataSet, icsc )
>> {
>> var list = dataSet.getValues();
>> dpSize = list.length;
>>
>> }
>>
>> function beforeDrawDataPointLabel( dph, label, icsc )
>> {
>> if( labelDrawSeries ){
>> if( dph.getIndex() == dpSize-1 ){
>> label.setVisible(true);
>> }else{
>> label.setVisible(false);
>> }
>> }
>> }
>>
>>
>> function beforeDrawSeries( series, isr, icsc )
>> {
>>
>> if( series.getSeriesIdentifier() == "series1" ){
>> labelDrawSeries=true;
>> }else{
>> labelDrawSeries=false;
>> }
>> }
>>
>> function afterDrawSeries( series, isr, icsc )
>> {
>> labelDrawSeries=false
>> }
>>
>>
>> to
>>
>>
>> dpSize = 0
>>
>> function afterDataSetFilled( series, dataSet, icsc )
>> {
>> var list = dataSet.getValues();
>> dpSize = list.length;
>>
>> }
>>
>> function beforeDrawDataPointLabel( dph, label, icsc )
>> {
>> if( dph.getIndex() == dpSize-1 ){
>> label.setVisible(true);
>> }else{
>> label.setVisible(false);
>> }
>> }
>>
>>
>> Jason
>>
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.17"
>> id="1">
>> <property name="createdBy">Eclipse BIRT Designer Version
>> 2.3.2.r232_20090202 Build&lt;2.3.2.v20090218-0730></property>
>> <property name="units">in</property>
>> <property name="comments">Copyright (c) 2007&lt;&lt;Your Company
>> Name here>>
>>
>> </property>
>> <html-property name="description">Creates a blank report with no
>> predefined content.</html-property>
>> <text-property name="displayName">Blank Report</text-property>
>> <property name="iconFile">/templates/blank_report.gif</property>
>> <data-sources>
>> <script-data-source name="Data Source" id="5"/>
>> </data-sources>
>> <data-sets>
>> <script-data-set name="Data Set" id="6">
>> <list-property name="resultSetHints">
>> <structure>
>> <property name="position">1</property>
>> <property name="name">category</property>
>> <property name="dataType">string</property>
>> </structure>
>> <structure>
>> <property name="position">2</property>
>> <property name="name">series1</property>
>> <property name="dataType">float</property>
>> </structure>
>> <structure>
>> <property name="position">3</property>
>> <property name="name">series2</property>
>> <property name="dataType">float</property>
>> </structure>
>> </list-property>
>> <list-property name="columnHints">
>> <structure>
>> <property name="columnName">category</property>
>> </structure>
>> <structure>
>> <property name="columnName">series1</property>
>> </structure>
>> <structure>
>> <property name="columnName">series2</property>
>> </structure>
>> </list-property>
>> <structure name="cachedMetaData">
>> <list-property name="resultSet">
>> <structure>
>> <property name="position">1</property>
>> <property name="name">category</property>
>> <property name="dataType">string</property>
>> </structure>
>> <structure>
>> <property name="position">2</property>
>> <property name="name">series1</property>
>> <property name="dataType">float</property>
>> </structure>
>> <structure>
>> <property name="position">3</property>
>> <property name="name">series2</property>
>> <property name="dataType">float</property>
>> </structure>
>> </list-property>
>> </structure>
>> <property name="dataSource">Data Source</property>
>> <method name="open"><![CDATA[i = 0;
>>
>> sourcedata = new Array( new Array(3),
>> new Array(3),
>> new Array(3),
>> new Array(3),
>> new Array(3));
>> sourcedata[0][0] = "Item1";
>> sourcedata[0][1] = 25;
>> sourcedata[0][2] = 10;
>>
>> sourcedata[1][0] = "Item2";
>> sourcedata[1][1] = 35;
>> sourcedata[1][2] = 33;
>>
>> sourcedata[2][0] = "Item3";
>> sourcedata[2][1] = 15;
>> sourcedata[2][2] = 25;]]></method>
>> <method name="fetch"><![CDATA[if ( i< 3 )
>> {
>> row["category"] = sourcedata[i][0];
>> row["series1"] = sourcedata[i][1];
>> row["series2"]= sourcedata[i][2];
>> i++;
>> return true;
>> }
>> return false;]]></method>
>> </script-data-set>
>> </data-sets>
>> <page-setup>
>> <simple-master-page name="Simple MasterPage" id="2"/>
>> </page-setup>
>> <body>
>> <extended-item extensionName="Chart" name="Overlay Line Chart"
>> id="4">
>> <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>Line Chart</Type>
>> <SubType>Overlay</SubType>
>> <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>Overlay Line Chart</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>
>> <Visible>true</Visible>
>> <HorizontalSpacing>5</HorizontalSpacing>
>> <VerticalSpacing>5</VerticalSpacing>
>> <ClientArea>
>> <Background xsi:type="attribute:ColorDefinition">
>> <Transparency>255</Transparency>
>> <Red>255</Red>
>> <Green>255</Green>
>> <Blue>225</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>false</Visible>
>> <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>Series</ItemType>
>> <Title>
>> <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>false</Visible>
>> </Title>
>> <TitlePosition>Above</TitlePosition>
>> </Children>
>> <Bounds>
>> <Left>0.0</Left>
>> <Top>0.0</Top>
>> <Width>432.0</Width>
>> <Height>216.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>255</Transparency>
>> <Red>255</Red>
>> <Green>255</Green>
>> <Blue>255</Blue>
>> </Background>
>> <Visible>true</Visible>
>> </Block>
>> <Dimension>Two_Dimensional</Dimension>
>> <Script>dpSize = 0
>>
>> labelDrawSeries = false;
>>
>> function afterDataSetFilled( series, dataSet, icsc )
>> {
>> var list = dataSet.getValues();
>> dpSize = list.length;
>>
>> }
>>
>> function beforeDrawDataPointLabel( dph, label, icsc )
>> {
>> if( labelDrawSeries ){
>> if( dph.getIndex() == dpSize-1 ){
>> label.setVisible(true);
>> }else{
>> label.setVisible(false);
>> }
>> }
>> }
>>
>>
>> function beforeDrawSeries( series, isr, icsc )
>> {
>>
>> if( series.getSeriesIdentifier() ==&quot;series1&quot; ){
>> labelDrawSeries=true;
>> }else{
>> labelDrawSeries=false;
>> }
>> }
>>
>> function afterDrawSeries( series, isr, icsc )
>> {
>> labelDrawSeries=false
>> }
>> </Script>
>> <Units>Points</Units>
>> <SeriesThickness>10.0</SeriesThickness>
>> <GridColumnCount>1</GridColumnCount>
>> <SampleData>
>> <BaseSampleData>
>> <DataSetRepresentation>'A','B','C','D','E'</DataSetRepresentation >
>> </BaseSampleData>
>> <OrthogonalSampleData>
>> <DataSetRepresentation>5.0,4.0,12.0</DataSetRepresentation >
>> <SeriesDefinitionIndex>0</SeriesDefinitionIndex>
>> </OrthogonalSampleData>
>> <OrthogonalSampleData>
>> <DataSetRepresentation>10.0,8.0,24.0</DataSetRepresentation >
>> <SeriesDefinitionIndex>1</SeriesDefinitionIndex>
>> </OrthogonalSampleData>
>> </SampleData>
>> <Interactivity>
>> <Enable>true</Enable>
>> <LegendBehavior>None</LegendBehavior>
>> </Interactivity>
>> <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>
>> </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>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>
>> </SeriesPalette>
>> <Series xsi:type="type:LineSeries">
>> <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;series1&quot;]</Definition>
>> </DataDefinition>
>> <SeriesIdentifier>series1</SeriesIdentifier>
>> <DataPoint>
>> <Components>
>> <Type>Orthogonal_Value</Type>
>> </Components>
>> <Separator>,</Separator>
>> </DataPoint>
>> <LabelPosition>Above</LabelPosition>
>> <Stacked>false</Stacked>
>> <Translucent>false</Translucent>
>> <Markers>
>> <Type>Triangle</Type>
>> <Size>4</Size>
>> <Visible>true</Visible>
>> </Markers>
>> <LineAttributes>
>> <Style>Solid</Style>
>> <Thickness>1</Thickness>
>> <Color>
>> <Transparency>255</Transparency>
>> <Red>249</Red>
>> <Green>225</Green>
>> <Blue>191</Blue>
>> </Color>
>> <Visible>true</Visible>
>> </LineAttributes>
>> <PaletteLineColor>false</PaletteLineColor>
>> <Curve>false</Curve>
>> <ShadowColor>
>> <Transparency>0</Transparency>
>> <Red>255</Red>
>> <Green>255</Green>
>> <Blue>255</Blue>
>> </ShadowColor>
>> <ConnectMissingValue>true</ConnectMissingValue>
>> </Series>
>> <Grouping>
>> <Enabled>false</Enabled>
>> <GroupingInterval>2.0</GroupingInterval>
>> <GroupType>Text</GroupType>
>> <AggregateExpression>Sum</AggregateExpression>
>> </Grouping>
>> <Sorting>Ascending</Sorting>
>> </SeriesDefinitions>
>> <SeriesDefinitions>
>> <Query>
>> <Definition></Definition>
>> </Query>
>> <SeriesPalette>
>> <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>232</Red>
>> <Green>172</Green>
>> <Blue>57</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;series2&quot;]</Definition>
>> </DataDefinition>
>> <SeriesIdentifier>series2</SeriesIdentifier>
>> <DataPoint>
>> <Components>
>> <Type>Orthogonal_Value</Type>
>> </Components>
>> <Separator>,</Separator>
>> </DataPoint>
>> <LabelPosition>Outside</LabelPosition>
>> <Stacked>false</Stacked>
>> <Riser>Rectangle</Riser>
>> </Series>
>> <Grouping>
>> <Enabled>false</Enabled>
>> <GroupingInterval>2.0</GroupingInterval>
>> <GroupType>Text</GroupType>
>> <AggregateExpression>Sum</AggregateExpression>
>> </Grouping>
>> </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>
>> <LabelPosition>Left</LabelPosition>
>> <Staggered>false</Staggered>
>> <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>Left</TickStyle>
>> <TickAttributes>
>> <Style>Solid</Style>
>> <Thickness>1</Thickness>
>> <Color>
>> <Transparency>255</Transparency>
>> <Red>196</Red>
>> <Green>196</Green>
>> <Blue>196</Blue>
>> </Color>
>> <Visible>true</Visible>
>> </TickAttributes>
>> </MajorGrid>
>> <MinorGrid>
>> <LineAttributes>
>> <Style>Solid</Style>
>> <Thickness>1</Thickness>
>> <Color>
>> <Transparency>255</Transparency>
>> <Red>225</Red>
>> <Green>225</Green>
>> <Blue>225</Blue>
>> </Color>
>> <Visible>false</Visible>
>> </LineAttributes>
>> <TickStyle>Across</TickStyle>
>> <TickAttributes>
>> <Style>Solid</Style>
>> <Thickness>1</Thickness>
>> <Color>
>> <Transparency>255</Transparency>
>> <Red>225</Red>
>> <Green>225</Green>
>> <Blue>225</Blue>
>> </Color>
>> <Visible>false</Visible>
>> </TickAttributes>
>> </MinorGrid>
>> <Scale>
>> <MinorGridsPerUnit>5</MinorGridsPerUnit>
>> </Scale>
>> <Origin>
>> <Type>Min</Type>
>> <Value xsi:type="data:NumberDataElement">
>> <Value>0.0</Value>
>> </Value>
>> </Origin>
>> <PrimaryAxis>true</PrimaryAxis>
>> <Percent>false</Percent>
>> </AssociatedAxes>
>> <SeriesDefinitions>
>> <Query>
>> <Definition></Definition>
>> </Query>
>> <SeriesPalette>
>> <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>
>> </SeriesPalette>
>> <Series>
>> <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>false</Visible>
>> </Label>
>> <DataDefinition>
>> <Definition>row[&quot;category&quot;]</Definition>
>> </DataDefinition>
>> <SeriesIdentifier></SeriesIdentifier>
>> <DataPoint>
>> <Components>
>> <Type>Orthogonal_Value</Type>
>> </Components>
>> <Separator>,</Separator>
>> </DataPoint>
>> <LabelPosition>Outside</LabelPosition>
>> <Stacked>false</Stacked>
>> </Series>
>> <Grouping>
>> <Enabled>false</Enabled>
>> <GroupingInterval>2.0</GroupingInterval>
>> <GroupType>Text</GroupType>
>> <AggregateExpression>Sum</AggregateExpression>
>> </Grouping>
>> </SeriesDefinitions>
>> <Orientation>Horizontal</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>
>> <LabelPosition>Below</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>Below</TickStyle>
>> <TickAttributes>
>> <Style>Solid</Style>
>> <Thickness>1</Thickness>
>> <Color>
>> <Transparency>255</Transparency>
>> <Red>196</Red>
>> <Green>196</Green>
>> <Blue>196</Blue>
>> </Color>
>> <Visible>true</Visible>
>> </TickAttributes>
>> </MajorGrid>
>> <MinorGrid>
>> <LineAttributes>
>> <Style>Solid</Style>
>> <Thickness>1</Thickness>
>> <Color>
>> <Transparency>255</Transparency>
>> <Red>225</Red>
>> <Green>225</Green>
>> <Blue>225</Blue>
>> </Color>
>> <Visible>false</Visible>
>> </LineAttributes>
>> <TickStyle>Across</TickStyle>
>> <TickAttributes>
>> <Style>Solid</Style>
>> <Thickness>1</Thickness>
>> <Color>
>> <Transparency>255</Transparency>
>> <Red>225</Red>
>> <Green>225</Green>
>> <Blue>225</Blue>
>> </Color>
>> <Visible>false</Visible>
>> </TickAttributes>
>> </MinorGrid>
>> <Scale>
>> <MinorGridsPerUnit>5</MinorGridsPerUnit>
>> <ShowOutside>false</ShowOutside>
>> </Scale>
>> <Origin>
>> <Type>Min</Type>
>> <Value xsi:type="data:NumberDataElement">
>> <Value>0.0</Value>
>> </Value>
>> </Origin>
>> <PrimaryAxis>true</PrimaryAxis>
>> <CategoryAxis>false</CategoryAxis>
>> <Percent>false</Percent>
>> </Axes>
>> <Orientation>Vertical</Orientation>
>> <Rotation/>
>> </model:ChartWithAxes>
>> ]]></xml-property>
>> <property name="outputFormat">SVG</property>
>> <property name="marginTop">0pt</property>
>> <property name="dataSet">Data Set</property>
>> <property name="height">3in</property>
>> <property name="width">6in</property>
>> <list-property name="boundDataColumns">
>> <structure>
>> <property name="name">category</property>
>> <expression
>> name="expression">dataSetRow["category"]</expression>
>> <property name="dataType">string</property>
>> </structure>
>> <structure>
>> <property name="name">series1</property>
>> <expression
>> name="expression">dataSetRow["series1"]</expression>
>> <property name="dataType">float</property>
>> </structure>
>> <structure>
>> <property name="name">series2</property>
>> <expression
>> name="expression">dataSetRow["series2"]</expression>
>> <property name="dataType">float</property>
>> </structure>
>> </list-property>
>> </extended-item>
>> </body>
>> </report>
>>
>>
>> On 11/23/2010 5:46 AM, Helmut Neubauer wrote:
>>> Hello,
>>>
>>> I'm using a scatter chart with several series. Now I want the chart to
>>> display series labels only for the last value of each series.
>>>
Re: How to show series labels only for the last value [message #798213 is a reply to message #640979] Tue, 14 February 2012 11:41 Go to previous messageGo to next message
Nikola Baranov is currently offline Nikola BaranovFriend
Messages: 11
Registered: February 2012
Junior Member
Jason Weathersby wrote on Tue, 23 November 2010 13:02
This definitely doable. Attached is an example that uses some script to
do exactly what you want. The chart has two series and the script only
shows the last label for one of the series, the other series all labels
are shown. It should be a simpler script to do on all series.

dpSize = 0

function afterDataSetFilled( series, dataSet, icsc )
{
var list = dataSet.getValues();
dpSize = list.length;

}

function beforeDrawDataPointLabel( dph, label, icsc )
{
if( dph.getIndex() == dpSize-1 ){
label.setVisible(true);
}else{
label.setVisible(false);
}
}


Hi guys!

I have the same case, but my series have Grouping.
And label shows only for one group (probably last).
How can I display label for last values for each group of my series?

Thanks.

[Updated on: Tue, 14 February 2012 11:48]

Report message to a moderator

Re: How to show series labels only for the last value [message #798451 is a reply to message #798213] Tue, 14 February 2012 18:00 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Try the attached.

Jason

On 2/14/2012 6:41 AM, Nikola Baranov wrote:
> Jason Weathersby wrote on Tue, 23 November 2010 13:02
>> This definitely doable. Attached is an example that uses some script
>> to do exactly what you want. The chart has two series and the script
>> only shows the last label for one of the series, the other series all
>> labels are shown. It should be a simpler script to do on all series.
>>
>> dpSize = 0
>>
>> function afterDataSetFilled( series, dataSet, icsc )
>> {
>> var list = dataSet.getValues();
>> dpSize = list.length;
>>
>> }
>>
>> function beforeDrawDataPointLabel( dph, label, icsc )
>> {
>> if( dph.getIndex() == dpSize-1 ){
>> label.setVisible(true);
>> }else{
>> label.setVisible(false);
>> }
>> }
>
>
> Hi guys!
>
> I have the same case, but my series have Grouping.
> And label shows only for one group (probably last).
> How can I display label for last values for each group of my series?
>
> Thanks?
Re: How to show series labels only for the last value [message #798554 is a reply to message #798451] Tue, 14 February 2012 20:51 Go to previous messageGo to next message
Nikola Baranov is currently offline Nikola BaranovFriend
Messages: 11
Registered: February 2012
Junior Member
Jason Weathersby wrote on Tue, 14 February 2012 13:00
Try the attached.

Jason


I changed a type of the diagram and it is not work Sad

Attached.
Re: How to show series labels only for the last value [message #798569 is a reply to message #798554] Tue, 14 February 2012 21:13 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

What did you change it to?

Jason

On 2/14/2012 3:51 PM, Nikola Baranov wrote:
> Jason Weathersby wrote on Tue, 14 February 2012 13:00
>> Try the attached.
>>
>> Jason
>
>
> I changed a type of the diagram and it is not work :(
>
> Attached.
Re: How to show series labels only for the last value [message #798584 is a reply to message #798569] Tue, 14 February 2012 21:34 Go to previous messageGo to next message
Nikola Baranov is currently offline Nikola BaranovFriend
Messages: 11
Registered: February 2012
Junior Member
Jason Weathersby wrote on Tue, 14 February 2012 16:13
What did you change it to?

Jason

On 2/14/2012 3:51 PM, Nikola Baranov wrote:
> Jason Weathersby wrote on Tue, 14 February 2012 13:00
>> Try the attached.
>>
>> Jason
>
>
> I changed a type of the diagram and it is not work Sad
>
> Attached.

Type of diagram now is Scatter and X-Axis&Y-Axis are integer&float types.
Also months is a texts.

Result attached.
  • Attachment: Scatter.jpg
    (Size: 22.09KB, Downloaded 226 times)
Re: How to show series labels only for the last value [message #799228 is a reply to message #798584] Wed, 15 February 2012 16:19 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Can you try the attached?

Jason

On 2/14/2012 4:34 PM, Nikola Baranov wrote:
> Jason Weathersby wrote on Tue, 14 February 2012 16:13
>> What did you change it to?
>>
>> Jason
>>
>> On 2/14/2012 3:51 PM, Nikola Baranov wrote:
>>> Jason Weathersby wrote on Tue, 14 February 2012 13:00
>>>> Try the attached.
>>>>
>>>> Jason
>>>
>>>
>>> I changed a type of the diagram and it is not work :(
>>>
>>> Attached.
>
> Type of diagram now is Scatter and X-Axis&Y-Axis are integer&float types.
> Also months is a texts.
>
> Result attached.
Re: How to show series labels only for the last value [message #799302 is a reply to message #799228] Wed, 15 February 2012 18:13 Go to previous messageGo to next message
Nikola Baranov is currently offline Nikola BaranovFriend
Messages: 11
Registered: February 2012
Junior Member
If you have seen my example, then You can add sorting on the Category Series and result will be good.
But, without sorting we can see only one label.
Have You seen the compare?
Is it bug?

In the real situation, I don't need sorting.

[Updated on: Wed, 15 February 2012 18:15]

Report message to a moderator

Re: How to show series labels only for the last value [message #799355 is a reply to message #799302] Wed, 15 February 2012 19:37 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

I am not sure what you mean. What do I need to change in my report to
get it to fail?
BTW what version of BIRT are you using?

Jason

On 2/15/2012 1:13 PM, Nikola Baranov wrote:
> If you have seen my example, then You can add sorting on the Category Series and result will be good.
> But, without sorting we can see only one label.
> Have You seen the compare?
> Is it bug?
Previous Topic:Problem with New Data Source wizard
Next Topic:Eclipse IDE and Birt is fine but...
Goto Forum:
  


Current Time: Thu Mar 28 07:59:00 GMT 2024

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

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

Back to the top