Skip to content

GoogleCharts: order of WithOptions causes issues rendering chart #67

Open

Description

@mathias-brandewinder

When creating a Chart using XPlot.GoogleCharts, if Chart.WithOptions is called after some other chart properties are set, these properties get ignored. If the call is made before them, they are rendered properly.

Expected behavior: order of the calls should not matter
Actual behavior: order of the calls causes some settings to be ignored.

Reproduction: .fsx script, Windows, .net45

#I "./packages/"
#r "Google.DataTable.Net.Wrapper/lib/Google.DataTable.Net.Wrapper.dll"
#r "XPlot.GoogleCharts/lib/net45/XPlot.GoogleCharts.dll"

open XPlot.GoogleCharts

let options = Configuration.Options()
options.lineWidth <- 2

[ 1;2;3;4;5;]
|> Chart.Line
|> Chart.WithTitle "The Title" // line A
|> Chart.WithOptions options // line B
|> Chart.Show

If the order of line A and line B is swapped, the Chart title is not rendered. The same thing happens with other calls, ex: Chart.WithXTitle

Activity

  1. added a commit that references this issue on Jul 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions