I apologize to my Flexcelsius readers for the lack of posts recently. I have been in high delivery mode and I’m finally back down with some time to create some fun and useful add-ons.
My previous post regarding add-ons was based on a very simple column chart that I indicated we would be extending on in subsequent posts. As a long time Flex dashboard developer, I really missed a few things in watching people create Xcelsius dashboards that I considered to be foundational in dashboard charting. To start, namely:
- Dynamic series colors: i.e. switching between series colors on-the-fly at runtime
- Dynamic series types: i.e. switching between series types on-the-fly at runtime
- Dynamic series addition and removal at runtime
- Dynamic series position at runtime
- Dynamic series alpha at runtime
- Dynamic HTML tooltips
These small but powerful features can significantly reduce the amount of objects needed to traditionally compensate for the absence of these abilities in the Xcelsius environment.
I wanted to create a simple yet powerful representation of these concepts that would show people that are new to Flex charting how exactly they may go about coding up quick charts to fill feature gaps and enhance their Xcelsius design-time productivity. I created a Line/Area/Column type combo chart that fulfills the requirements called out in the list above and have included the full source code, including a functional Xcelsius XLF model to serve as a functional example here:
The property sheet is really simple and if you look at the example XLF, you’ll see how the data needs to be structured for the series and the chart data.
A few notes regarding this chart’s functionality:
- You can switch series types at runtime
- You can add or remove series at runtime by blanking out a given series type cell value
- You can add and remove data dynamically at runtime
- You can change the order that series appear at runtime i.e. bringing to front or sending to back
- You can set the chart’s font color through a color picker in the property sheet
- Chart series are added in the order specified, so if you put an area series on last, it will render in front of the other series present on the chart, etc.
- All of the chart’s functionality barring colors, is completely data driven
- HTML tooltips only support basic tags and do not support images or other more advanced features…yet.
- Data and tooltips share cells separated by a : See XLF for an example
- Please refer to the XLF on how to properly structure your data for this chart
In my next post, we will further extend this chart, adding in very useful features such as drilling down in-place, without any Xcelsius logic.
Best Regards,
Evan DeLodder