fslaborg / zzarchive-FsLab

A collection of packages for data science with F#
http://fslab.org
Other
159 stars 42 forks source link

Chart.Line sometimes shows erroneous curves in the case of incomplete data #108

Closed sporring closed 8 years ago

sporring commented 8 years ago

In the following code, the two plots look quite different: `#load "packages/FsLab/FsLab.fsx"

open Deedle open FSharp.Data open XPlot.GoogleCharts open XPlot.GoogleCharts.Deedle

let wb = WorldBankData.GetDataContext() let cz = wb.Countries.Czech Republic.Indicators let eu = wb.Countries.European Union.Indicators let czforest = series cz.Forest area (% of land area) let euforest = series eu.Forest area (% of land area)

[ czforest.[1990 .. 1993]; euforest.[1990 .. 1993] ] |> Chart.Line |> Chart.WithOptions (Options(legend=Legend(position="bottom"))) |> Chart.WithLabels ["CZ"; "EU"]

[ euforest.[1990 .. 1993]; czforest.[1990 .. 1993] ] |> Chart.Line |> Chart.WithOptions (Options(legend=Legend(position="bottom"))) |> Chart.WithLabels ["EU"; "CZ"]` The difference seems to be due to missing data - there is no value for czforest.[1992]. My view is that the last version (interrupted curves) is the correct display of the data.

tpetricek commented 8 years ago

I think this is XPlot issue - opened there.