Home » Archived » BIRT » Charting: Making gaps in line chart from groups (instead of nulls)
Charting: Making gaps in line chart from groups (instead of nulls) [message #260529] |
Mon, 05 November 2007 01:47  |
Eclipse User |
|
|
|
Originally posted by: clf.clf.com
Hello,
I'll try to explain this by a hypothetical example. Suppose I was charting
car sales over time. X-axis is timeline, Y-axis is number of sales and
Y-series grouping is manufacturer (red line for Toyota, blue line for Honda,
etc).
Easy enough so far. The problem I'm having, is that suppose I want to view
this by 'Sale Events'. In other words, we might have a special sale
(called Sale#1) lasting from Sept 1 - Sep 3 and Sale#2 going from Sept 23 -
Sept 24. I would want to see a gap in the lines from Sept 4 to Sept 22.
I do not have data records (that means, NO null values) for this in-between
period. Instead, each record has the sale ID. Is it possible to create
gaps in the lines using the sale ID as a grouping?
I'm using Birt 2.2
Thank you
|
|
|
Re: Charting: Making gaps in line chart from groups (instead of nulls) [message #260585 is a reply to message #260529] |
Mon, 05 November 2007 06:21   |
Eclipse User |
|
|
|
It should be, there is a setting in Line series to create a gap in the line
for null values. It's called setConnectMissingValue in the API, but it's
also possible to set it in the chart builder.
Thanks,
David
"clf" <clf@clf.com> wrote in message news:fgmeao$816$1@build.eclipse.org...
> Hello,
>
> I'll try to explain this by a hypothetical example. Suppose I was
> charting car sales over time. X-axis is timeline, Y-axis is number of
> sales and Y-series grouping is manufacturer (red line for Toyota, blue
> line for Honda, etc).
> Easy enough so far. The problem I'm having, is that suppose I want to
> view this by 'Sale Events'. In other words, we might have a special sale
> (called Sale#1) lasting from Sept 1 - Sep 3 and Sale#2 going from Sept
> 23 - Sept 24. I would want to see a gap in the lines from Sept 4 to Sept
> 22.
> I do not have data records (that means, NO null values) for this
> in-between period. Instead, each record has the sale ID. Is it
> possible to create gaps in the lines using the sale ID as a grouping?
>
> I'm using Birt 2.2
>
> Thank you
>
|
|
|
Re: Charting: Making gaps in line chart from groups (instead of nulls) [message #260625 is a reply to message #260585] |
Mon, 05 November 2007 11:16   |
Eclipse User |
|
|
|
Originally posted by: clf.clf.com
Thanks for the reply David. Sorry for being dense, but as I understand it
this will not work for me, because as I said, I don't have any null values
(sample data below). The only thing I have for grouping data between gaps
is SaleID.
Here's what I understand you're saying...
-----------------------------------------------------
| Type | UnitsSold | SaleID |
-----------------------------------------------------
| Sept 1 | TOYOTA | 3 | 1 |
| Sept 1 | HONDA | 6 | 1 |
| Sept 2 | TOYOTA | 5 | 1 |
| Sept 2 | HONDA | 2 | 1 |
| Sept 3 | null | null | null |
| Sept 23 | TOYOTA | 4 | 2 |
| Sept 23 | HONDA | 7 | 2 |
| Sept 24 | TOYOTA | 2 | 2 |
| Sept 24 | HONDA | 9 | 2 |
But this is more like what I would have.....
-----------------------------------------------------
| Type | UnitsSold | SaleID |
-----------------------------------------------------
| Sept 1 | TOYOTA | 3 | 1 |
| Sept 1 | HONDA | 6 | 1 |
| Sept 2 | TOYOTA | 5 | 1 |
| Sept 2 | HONDA | 2 | 1 |
| Sept 23 | TOYOTA | 4 | 2 |
| Sept 23 | HONDA | 7 | 2 |
| Sept 24 | TOYOTA | 2 | 2 |
| Sept 24 | HONDA | 9 | 2 |
"David Michonneau" <dmichonneau@actuate.com> wrote in message
news:fgmuca$scc$1@build.eclipse.org...
> It should be, there is a setting in Line series to create a gap in the
> line for null values. It's called setConnectMissingValue in the API, but
> it's also possible to set it in the chart builder.
>
> Thanks,
>
> David
>
> "clf" <clf@clf.com> wrote in message
> news:fgmeao$816$1@build.eclipse.org...
>> Hello,
>>
>> I'll try to explain this by a hypothetical example. Suppose I was
>> charting car sales over time. X-axis is timeline, Y-axis is number of
>> sales and Y-series grouping is manufacturer (red line for Toyota, blue
>> line for Honda, etc).
>> Easy enough so far. The problem I'm having, is that suppose I want to
>> view this by 'Sale Events'. In other words, we might have a special
>> sale (called Sale#1) lasting from Sept 1 - Sep 3 and Sale#2 going from
>> Sept 23 - Sept 24. I would want to see a gap in the lines from Sept 4 to
>> Sept 22.
>> I do not have data records (that means, NO null values) for this
>> in-between period. Instead, each record has the sale ID. Is it
>> possible to create gaps in the lines using the sale ID as a grouping?
>>
>> I'm using Birt 2.2
>>
>> Thank you
>>
>
>
|
|
|
Re: Charting: Making gaps in line chart from groups (instead of nulls) [READ THIS ONE INSTEAD] [message #260633 is a reply to message #260585] |
Mon, 05 November 2007 11:20   |
Eclipse User |
|
|
|
Originally posted by: clf.clf.com
[Sorry.. previous post got sent prematurely]
Thanks for the reply David. Sorry if I'm being dense, but as I understand
it
this will not work for me, because as I said, I don't have any null values
(sample data below). The only thing I have for grouping data between gaps
is SaleID.
Here's what I understand you're saying...
-----------------------------------------------------
| Type | UnitsSold | SaleID |
-----------------------------------------------------
| Sept 1 | TOYOTA | 3 | 1 |
| Sept 1 | HONDA | 6 | 1 |
| Sept 2 | TOYOTA | 5 | 1 |
| Sept 2 | HONDA | 2 | 1 |
| Sept 3 | null | null | null |
| Sept 23 | TOYOTA | 4 | 2 |
| Sept 23 | HONDA | 7 | 2 |
| Sept 24 | TOYOTA | 2 | 2 |
| Sept 24 | HONDA | 9 | 2 |
But this is more like what I would have.....
-----------------------------------------------------
| Type | UnitsSold | SaleID |
-----------------------------------------------------
| Sept 1 | TOYOTA | 3 | 1 |
| Sept 1 | HONDA | 6 | 1 |
| Sept 2 | TOYOTA | 5 | 1 |
| Sept 2 | HONDA | 2 | 1 |
| Sept 23 | TOYOTA | 4 | 2 |
| Sept 23 | HONDA | 7 | 2 |
| Sept 24 | TOYOTA | 2 | 2 |
| Sept 24 | HONDA | 9 | 2 |
Here's another example of what I might have (notice there is no data for
Sept 2 but still is Sale#1).....
-----------------------------------------------------
| Type | UnitsSold | SaleID |
-----------------------------------------------------
| Sept 1 | TOYOTA | 3 | 1 |
| Sept 1 | HONDA | 6 | 1 |
| Sept 3 | TOYOTA | 5 | 1 |
| Sept 3 | HONDA | 2 | 1 |
| Sept 23 | TOYOTA | 4 | 2 |
| Sept 23 | HONDA | 7 | 2 |
| Sept 24 | TOYOTA | 2 | 2 |
| Sept 24 | HONDA | 9 | 2 |
Am I missing something in what you're saying?
Thanks!
"David Michonneau" <dmichonneau@actuate.com> wrote in message
news:fgmuca$scc$1@build.eclipse.org...
> It should be, there is a setting in Line series to create a gap in the
> line for null values. It's called setConnectMissingValue in the API, but
> it's also possible to set it in the chart builder.
>
> Thanks,
>
> David
>
> "clf" <clf@clf.com> wrote in message
> news:fgmeao$816$1@build.eclipse.org...
>> Hello,
>>
>> I'll try to explain this by a hypothetical example. Suppose I was
>> charting car sales over time. X-axis is timeline, Y-axis is number of
>> sales and Y-series grouping is manufacturer (red line for Toyota, blue
>> line for Honda, etc).
>> Easy enough so far. The problem I'm having, is that suppose I want to
>> view this by 'Sale Events'. In other words, we might have a special
>> sale (called Sale#1) lasting from Sept 1 - Sep 3 and Sale#2 going from
>> Sept 23 - Sept 24. I would want to see a gap in the lines from Sept 4 to
>> Sept 22.
>> I do not have data records (that means, NO null values) for this
>> in-between period. Instead, each record has the sale ID. Is it
>> possible to create gaps in the lines using the sale ID as a grouping?
>>
>> I'm using Birt 2.2
>>
>> Thank you
>>
>
>
|
|
|
Re: Charting: Making gaps in line chart from groups (instead of nulls) [READ THIS ONE INSTEAD] [message #260675 is a reply to message #260633] |
Mon, 05 November 2007 12:57   |
Eclipse User |
|
|
|
Sorry I misread your first post. What you can do is create one series per
type, if you know in advance all the types (and there are not too many),
then group by saleID. If this is not possible, you will have to insert null
values into your data to artificially create the gaps. The chart engine can
only generate series groups on a single key.
Thanks,
David
"clf" <clf@clf.com> wrote in message news:fgnfrq$n74$1@build.eclipse.org...
> [Sorry.. previous post got sent prematurely]
>
> Thanks for the reply David. Sorry if I'm being dense, but as I understand
> it
> this will not work for me, because as I said, I don't have any null values
> (sample data below). The only thing I have for grouping data between
> gaps
> is SaleID.
>
>
>
> Here's what I understand you're saying...
> -----------------------------------------------------
> | Type | UnitsSold | SaleID |
> -----------------------------------------------------
> | Sept 1 | TOYOTA | 3 | 1 |
> | Sept 1 | HONDA | 6 | 1 |
> | Sept 2 | TOYOTA | 5 | 1 |
> | Sept 2 | HONDA | 2 | 1 |
> | Sept 3 | null | null | null |
> | Sept 23 | TOYOTA | 4 | 2 |
> | Sept 23 | HONDA | 7 | 2 |
> | Sept 24 | TOYOTA | 2 | 2 |
> | Sept 24 | HONDA | 9 | 2 |
>
>
> But this is more like what I would have.....
> -----------------------------------------------------
> | Type | UnitsSold | SaleID |
> -----------------------------------------------------
> | Sept 1 | TOYOTA | 3 | 1 |
> | Sept 1 | HONDA | 6 | 1 |
> | Sept 2 | TOYOTA | 5 | 1 |
> | Sept 2 | HONDA | 2 | 1 |
> | Sept 23 | TOYOTA | 4 | 2 |
> | Sept 23 | HONDA | 7 | 2 |
> | Sept 24 | TOYOTA | 2 | 2 |
> | Sept 24 | HONDA | 9 | 2 |
>
>
> Here's another example of what I might have (notice there is no data for
> Sept 2 but still is Sale#1).....
> -----------------------------------------------------
> | Type | UnitsSold | SaleID |
> -----------------------------------------------------
> | Sept 1 | TOYOTA | 3 | 1 |
> | Sept 1 | HONDA | 6 | 1 |
> | Sept 3 | TOYOTA | 5 | 1 |
> | Sept 3 | HONDA | 2 | 1 |
> | Sept 23 | TOYOTA | 4 | 2 |
> | Sept 23 | HONDA | 7 | 2 |
> | Sept 24 | TOYOTA | 2 | 2 |
> | Sept 24 | HONDA | 9 | 2 |
>
>
> Am I missing something in what you're saying?
>
> Thanks!
>
>
>
> "David Michonneau" <dmichonneau@actuate.com> wrote in message
> news:fgmuca$scc$1@build.eclipse.org...
>> It should be, there is a setting in Line series to create a gap in the
>> line for null values. It's called setConnectMissingValue in the API, but
>> it's also possible to set it in the chart builder.
>>
>> Thanks,
>>
>> David
>>
>> "clf" <clf@clf.com> wrote in message
>> news:fgmeao$816$1@build.eclipse.org...
>>> Hello,
>>>
>>> I'll try to explain this by a hypothetical example. Suppose I was
>>> charting car sales over time. X-axis is timeline, Y-axis is number of
>>> sales and Y-series grouping is manufacturer (red line for Toyota, blue
>>> line for Honda, etc).
>>> Easy enough so far. The problem I'm having, is that suppose I want to
>>> view this by 'Sale Events'. In other words, we might have a special
>>> sale (called Sale#1) lasting from Sept 1 - Sep 3 and Sale#2 going from
>>> Sept 23 - Sept 24. I would want to see a gap in the lines from Sept 4
>>> to Sept 22.
>>> I do not have data records (that means, NO null values) for this
>>> in-between period. Instead, each record has the sale ID. Is it
>>> possible to create gaps in the lines using the sale ID as a grouping?
>>>
>>> I'm using Birt 2.2
>>>
>>> Thank you
>>>
>>
>>
>
>
|
|
| |
Goto Forum:
Current Time: Mon May 12 17:51:22 EDT 2025
Powered by FUDForum. Page generated in 0.03567 seconds
|