Pages

Thursday, August 23, 2007

BI Office in 10.1.3.3 - Flash

Or why the BI Office in 10.1.3.3 provides the ability to insert BI Chart views inside Excel and PowerPoint as native Office charts, or as static images, or as Flash objects (only in PowerPoint).

Why Flash? No of course you shouldn't.
Isn't Flash only for movies? Isn't Flash only for animated content? Isn't Flash only for 'this' or 'that'? Aren't Flash charts supposed to jiggle, wiggle, wriggle, and do animated dances? No, I submit to you.

I would suggest you go to Wikipedia and read up this page that describes the fascinating history of Flash - the player, the platform, and format, all. Also read this page on Wikipedia - Category:Graphics file formats, lots of very useful information there.

As far as BI EE is concerned, Flash charts offer greater quality and interactivity than raster based image formats like PNG or JPEG.

BI Presentation Services however do offer you the choice of having charts render in vector based Flash or SVG formats, or as raster based PNG or JPEG images.

The way to do that is to modify the instanceconfig.xml file and specify the chart format thy heart desires. If your Oracle BI data directory is "C:\OracleBIData" then the instanceconfig.xml file can be found under the C:\OracleBIData\web\config folder.


Open the instanceconfig.xml file using a text editor and insert these three lines in the file:

<charts>
<defaultimagetype>PNG</defaultimagetype>

</charts>


Save the file.
Restart your Presentation Server. You can use Windows Services or the command line to do that (net start "Oracle BI Presentation Services")


After that go to Answers and view any chart that you had created earlier (you could even create new charts, but I thought this may be quicker), and check the properties of the chart that comes up:

Since I specified PNG as the image type, the bar chart below shows up as a PNG image in Answers.


The same bar chart as a JPEG image.


And as an SVG image.

(ठीक है ठीक है) theek hai theek hai I get it.
All this is also available in the documented Presentation Services Administration Guide (PDF): see the section "Specifying the Oracle Business Intelligence Chart Image Type" on page 50 of the doc.

So, coming back to the original question, "why Flash", the short answer is that Flash is a vector based image format and provides better quality, more interactivity (like mouse over tooltips, etc...), and charts inserted as Flash objects in presentations generally tend to look better than raster based images.

Let's elucidate with an example.

Compare these two screenshots. The one below is a bubble chart inserted as an image inside a PowerPoint presentation.

And this screenshot is of the same chart inserted in PowerPoint as a Flash chart.

As you would see the quality of the two charts is different. With the image based format there is some amount of pixelation and some blurriness in the image, but not so with the Flash chart.
But, surely, you could argue that the answer is simply to have larger sized charts in Answers in the first place. Yes, I could have a larger chart in Answers, and when I add that (larger chart) to my slide as an image the quality won't suffer. True. But that’s more work, and you may not always want to go to Answers to change your chart size- it could have unintended consequences (if you insert that chart in a Dashboard page it shall occupy an inordinately large amount of screen real estate for one). Increasing the size of the chart increases the size of the image file generated when you insert it in PowerPoint for example, but with vector based formats there is no change in file size:

See with another example:
For a pretty small chart the size of the image file is 22KB


while the Flash chart (.swf file) is 26KB (actually a little bit larger than the image file).


Now, if you increase the size of the chart, the size of the image file more than doubles to 58KB


while the Flash file increases in size by only 20% to 31KB.



And to illustrate it even better, these below are two screenshots of the same chart view.
In this case I have scaled the chart image to 200% of its original size and then taken a screenshot:


And in this case below, I have inserted the same BI chart view in a slide as a Flash object, increased the size of the object to 200% of its original size, and then take the screenshot:

Nice.
So, the next question is: why not have Flash charts in Excel too? क्यों? बोलो बोलो, कुछ तो बोलो! (
Kyon? bolo bolo, kuch to bolo!)

Well - here's the scoop. We did have Flash charts in Excel at one point during the development cycle. It's after all the same code that's calling the Presentation Server to get the Flash file for the selected chart view. And you could insert BI Chart views in Excel sheets as Flash objects. But feedback from people who tried it internally was that Flash charts in Excel are not easy to move around. Not BI Flash charts, but all Flash objects. It's almost impossible to even select them by clicking the Flash chart in Excel. Try it sometime - take a Flash chart from PowerPoint or any Flash file you can lay your hands on from anywhere else, copy it, and paste it inside an Excel sheet and then try to move it around. Also, there was the argument, philosophical in some sense, that Excel is more for displaying numbers and all, so let's leave the Flash charts for PowerPoint. Fair enough.

Let us know if you think otherwise - and if you would like Flash charts back in Excel (they never were there in the production release actually...). It’s (almost) as simple (I hope) as un-commenting back some code to enable the “Insert as Flash” back into Excel.

This is one example where we found that removing functionality can actually be a good thing and make the product better.