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

GoogleCharts: order of WithOptions causes issues rendering chart #67

Open
mathias-brandewinder opened this issue Jun 22, 2018 · 0 comments

Comments

@mathias-brandewinder
Copy link
Contributor

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

mathias-brandewinder added a commit to mathias-brandewinder/XPlot that referenced this issue Jul 14, 2018
Prevent Chart.WithOptions to overwrite title if a title has been set already.
dsyme added a commit that referenced this issue Jul 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants