Angara.Chart
An F# data visualization library. Supports visualization of uncertain values. Powered by JavaScript library InteractiveDataDisplay.
PM> Install-Package Angara.Chart
Example
The example builds a chart consisting of the line and markers plots:
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: |
|
Plot Gallery
This section is a gallery of plots supported by the Angara.Chart. Here we use Angara.Table to load sample data which then is displayed with Angara.Chart.
Preparing data
The code loads several tables that will be used in the following charts.
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: |
|
Line and uncertainty bands
The functions Plot.line
allow to define a plot displayed straight line segments connecting a series of data points.
It is enough to provide just y
data series to define a line plot:
1: 2: 3: |
|
The following plot takes both x
and y
series, defines stroke
color, line thickness
and axis titles.
See the API Reference for other optional parameteres of the line plot.
1: 2: 3: 4: 5: 6: |
|
If a variable that determines the position on the vertical axis is uncertain, bands corresponding to the given quantiles of the uncertain values are displayed in addition to the line segments, which represent median values.
1: 2: 3: 4: 5: |
|
Area
1: 2: 3: 4: 5: 6: |
|
Markers
It is a plot which displays data as a collection of points, each having the value of one data series determining the position on the horizontal axis and the value of the other data series determining the position on the vertical axis. Also data series can be bound to marker size and color, and other appearance settings.
Markers plot has default collection of supported shapes such as box, circle, cross, triangle etc, but still it allows creating new shapes.
1: 2: 3: 4: 5: |
|
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: |
|
1: 2: 3: 4: 5: 6: 7: 8: |
|
The shapes petals
, bull-eye
, boxwhisker
allow drawing data
if one of the properties is uncertain. Uncertain variable is represented as a set of quantiles.
Particular qualities for each shape are described below.
Petals is a kind of markers when shape indicates level of uncertainty.
Data series size
is a set of quantiles which must contain lower95
and upper95
.
1: 2: 3: 4: 5: 6: 7: 8: |
|
Bull-eyes is a kind of markers when outer and inner colors indicate level of uncertainty.
Data series size
is a size in pixels, same for all markers;
color
is an array of quantiles which must contains median
, lower95
and upper95
.
1: 2: 3: 4: 5: 6: |
|
Box-and-whisker plot is displayed if y
is uncertain and given as an array of quantiles,
which may contain all or some of properties median
, lower95
, upper95
,
lower68
and upper68
. )
1: 2: 3: 4: 5: |
|
Heatmap displays a graphical representation of data where the individual values contained
in a matrix are represented as colors. If the values are uncertain,
it allows to see quantiles of each point and highlight regions with similar values.
The plot supports NaN
as all other plots; corresponding cells are colored with transparent grey.
1: 2: 3: 4: 5: |
|
1: 2: 3: |
|
Heatmap values also can be uncertain, if they are defined as quantiles
containing median
, lower68
, upper68
. The plot displays median values,
but if a probe is pulled on the heatmap, the probe card contains "Highlight similar"
checkbox which highlights areas of the heatmap with values similar to the value
under the probe.
1: 2: 3: 4: 5: 6: 7: 8: 9: |
|
See more details about plots here.
Contributing and copyright
The project is hosted on GitHub where you can report issues, fork the project and submit pull requests. If you're adding a new public API, please also consider adding samples that can be turned into a documentation. You might also want to read the library design notes to understand how it works.
The library is available under Public Domain license, which allows modification and redistribution for both commercial and non-commercial purposes. For more information see the License file in the GitHub repository.