Saturday 9 August 2014

Sparkline Charts in Webi

Sparkline Charts in Webi

Sparklines. They’re a great way to show a lot of information in a small amount of space. We’ve had them in Xcelsius and the BI Mobile app for a while now, but they’re not yet officially available in Webi. This trick will show you how to grace your Webi report with a sparkline.
I’m Using
  • BI4.0 SP5
I’m Assuming
  • You’re familiar with Webi
  • You have some trend data that you want to display in a Webi table.


The End Result

image


The How To
This one is quite simple. All I’m doing is creating a section with a normal area chart, the trick here is really about sizing and aligning the objects, and creating some formatting to give the result a familiar look and feel of a table (aka a ‘block’).
Generally speaking, sparklines are good for showing trend data (e.g. revenue for the last 12 months) to supplement other information. The example I use in this post is a simple list of customers, showing basic information in tabular format, and a graphic depicting sales over the last 12 months. Here’s how:
  1. To understand what data you would like to show, imagine that you only want to show one column for revenue. Create the table as you normally would, including any formatting that you’d like to apply, like so.
    image

    I’ve said it before, but if you’re getting started with BusinessObjects and need some practice data, I highly recommend Microsoft’s AdventureWorks database.
  2. Create a section on whatever should signify a new row in your table. For me, this is simply customer name. Insert the new section above the table and ensure that your table is broken apart so that each section contains only one row.
    image

    You should see something messy like the below.
    image
  3. Delete the large header that was inserted for each company (but don’t delete the whole section).
    image
    1. In the body of the section, add the type of chart you want to see in your sparkline chart. For me, this is an area chart showing revenue by quarter.
      image

      Working with sections can be tricky; if you get lost, remember that you can view Structure Only which often gives better visibility of what’s being show on the page.
    2. Right click the chart and select Format Chart…
    3. In the Global > Area Display section, untick the six tick boxes for Category AxisValue Axis and Legend then click OK. You should now have a chart without the trimmings.
    4. Right click the edge of the table and select Edit Table…
    5. Under General, un-tick Show table headers.
    6. Under Layout set the alignment to 0 from the left and top of the section.
      image

      So now you have the all the components and the body of the table, all you need to do is align them.
      image
    7. You can click and drag if you like (snap to grid is your friend) but for setting column widths, it will help to use the properties dialogue for each object. Below is the result of setting column widths to nice round numbers (for me, 3cm, 4cm etc.) the cell height to 0.6cm, the chart and section height to 0.6cm and the section padding to 0.
      image
    8. Add a blank cell for each of the columns that will act as the header. Set each one to the same width as the column below it, and also set them to Repeat on every page.
    9. Lastly, you can add conditional formatting using RunningCount to stripe the rows, if that’s your thing.
      image
    So there you have it, some lovely sparklines to rival your BI Mobile and Xcelsius dashboards.
    - See more at: http://blog.davidg.com.au/2012/12/sparkline-charts-in-webi.html#sthash.jBLu4GpD.dpuf

    1 comment: