fslaborg / FSharp.Charting

Charting library suitable for interactive F# scripting
http://fslab.org/FSharp.Charting/
Other
212 stars 67 forks source link

Bug - Point chart with one date element cannot be combined with Line charts #135

Closed MendelMonteiro closed 2 years ago

MendelMonteiro commented 7 years ago

Point charts with only one element are treated differently (the date component seems to be dropped when determining the x-axis placement). This causes issues when combining the chart with other charts such as line charts.

let line = [ (DateTime.Today, 42); (DateTime.Today.AddDays(1.0), 43) ]
let onePoint = [ (DateTime.Today, 41) ]
let twoPoints = [ (DateTime.Today, 41); (DateTime.Today.AddDays(1.0), 42) ]
Chart.Combine [ Chart.Line line; Chart.Point onePoint ] // Point is not drawn in line with first line point
Chart.Combine [ Chart.Line line; Chart.Point twoPoints ] // Points are draw correctly in line with both line points