Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tpetricek opened this issue Jan 30, 2016 · 0 comments
Labels

Comments

@tpetricek
Copy link
Member

[Cross-posting from https://github.com/fslaborg/FsLab/issues/108]

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.

@cartermp cartermp added the bug label Nov 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants