Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Data set with dynamic table name and unknown number of series in a chart
Mathieu Hicauber
<div style="margin:0px 5px 5px 0px;color:rgb(0,0,0);font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;">
<p>I'm new to Birt, so I might be doing this the wrong way...</p>
<p>What I need to do is to display statistical data in reports. Data will be prepared overnight in some special tables (I wanted to use materialized views, but haven't been able to find it in Birt report designer when connecting through JDBC to my DB - so I'll be using tables instead).</p>
<p>The typical chart I need to draw is : - month on X-Axis - a value on Y Axis.</p>
<p>For the Y Axis, there will be multiple series... But I don't know how many. Each serie data will be fetched from one of those special report table I was talking just above.</p>
<p>I have two main problems : - how to display N series on a chart, N being unknown ? - how to dynamize table names in a data set ?</p>
<p>Is there a more Birt-ish way to do so ? Maybe I have it completely wrong from the beginning, really don't know.</p>
<p>Thank you for your help.</p>
<div>Mathieu</div>
</div>
<p> </p>
Find more posts tagged with
Comments
mwilliams
<p>The easiest way to get N series in a chart dynamically would be to structure your data like:</p>
<p> </p>
<p>Date | Value | Series</p>
<p>Date1 | Value1 | Series1</p>
<p>Date2 | Value2 | Series1</p>
<p>Date1 | Value3 | Series2</p>
<p>Date2 | Value4 | Series2</p>
<p>etc...</p>
<p> </p>
<p>Then, you'd place your date in the x-axis field, the value in the y-axis field, and the series in the optional y-series grouping field.</p>
<p> </p>
<p>This may mean unioning results in your query. You can dynamically build your query in the beforeOpen script of your data set.</p>
Mathieu Hicauber
<p>Hi,</p>
<p> </p>
<p>Thank you for your answer. I'm glad, that's what I ended up doing last night before I see your answer - I'm making some progress at least :-)</p>
<p> </p>
<p>However, I have now an issue with the legend : legend is automatically generated for x axis values - is there any way to change that ?(see <a data-ipb='nomediaparse' href='
http://minus.com/lpjX1ShjOICxH'>http://minus.com/lpjX1ShjOICxH</a>
; : legend and data are colored by month number, whereas I'd like it to use series name) </p>
<p> </p>
<p>Thanks,</p>
<p> </p>
<p>Mathieu</p>
Mathieu Hicauber
<p>Don't bother with it, I just recreated the chart and legend is ok now...</p>
<p>Thanks a lot for </p>
<p> </p>
<p>Mathieu.</p>
mwilliams
<p>Glad everything is working as you expect, now! Let us know whenever you have questions.
</p>