FSharpChart now supports binding for Stacked Charts and for modifying the Marker associated with a series.
As always one can download the latest release from:
In previous versions of FSharpChart it was not very intuitive how a Stacked Chart could be plotted. What one had to do was define a CombinedChart where one defines the charts to be combined with the same StackedGroupName property value:
This displays the following chart:
(Thanks to Tomas Petricek for this sample)
This approach also allows one to easily combine multiple Stacked Charts using different StackedGroupName properties:
However, for Stacked Charts, a more intuitive approach would be just to specify a list of data series. With this new release one can now specify the data series using the following formats:
This now allows one to define, say a StackedColumn chart, using the much simpler expression:
Hopefully you will agree this is much simpler and more intuitive. The only current limitation of this binding approach is that one cannot use a CombinedChart for multiple Stacked Charts when binding in this fashion. If this is the desire then the previous approach with distinct StackedGroupName properties is needed.
The download also includes a new WinForms sample demonstrating how bindings can be managed for these Stacked Charts.
thanks to a community suggestion I have also added support for modifying the Marker associated with a series. To modify the Marker for a Data Series one can now write:
Again, this displays the chart:
Don’t forget the package is also available from NuGet:
Once again enjoy!
Written by Carl Nolan