Sparkline Flex custom components (LineChart and BarChart)
Sparklines are defined by Edward Tufte, their creator as: Intense, Simple, Word-Sized Graphics.
Here are new Flex custom components allowing to easily integrate Sparklines in any Flex application.
If you don’t know yet what are Sparklines, I strongly encourage you to read “Sparklines: theory and practise“, an article written by Edward Tufte, known as the Sparkline inventor.
I thought that it would a good exercise to develop my own Flex custom components for these beautiful Sparklines and I had not been disappointed developing them! Most of the topics that I recently shared with you along my tutorials helped me a lot and were put in practice while developing my two new Flex custom components:
Here is a small demonstration of
SparklineBarChart components (right click to view source code):
Here are some key features provided by
- As visible above,
SparklineBarChartcomponents can be used as standalone controls or as item renderers in list or data grid.
- They offer different styling options such that you can easily integrate them in accordance with your application’s theme (color, line weight, transparency, …).
- They support a configurable threshold used to determine bar color or to highlight an important area (play with the sliders to see how the threshold value impacts the rendering).
- SparklineChart have a
dataProviderproperty ensuring that the
SparklineChartis automatically updated whenever the data changes (use the “Start/Stop timer” check box to see sparklines updated in real time).
- Chart scales can be automatically determined or manually defined.
- Tooltips are optional and can be customized.
- And more! Check the provided documentation for all details.
It was a lot of fun for me developing these components, I hope it will be as fun for you using them!