FSharp.Charting
FSharp.Charting copied to clipboard
Side effect when settting PropertyDefaults for Charting.Grid to Enabled = false
When setting the PropertyDefaults for Charting.Grid to Enabled = false, it will lead to Charting.TickMark Enabled set to false as well. An additional type check might do the trick: let internal applyDefaults (chartType:SeriesChartType, target:'a, targetParentType:Type option, targetType:Type, property:PropertyInfo) = .... (propDefault.ParentType |> Option.forall (fun parentType -> parentType = targetType)) && ....
PS: This is my first command at all. I hope it is properly stated...Plus many thanks for providing such a great library...
Could you write an exact repro, i.e. what to add to the PropertyDefaults, and which chart?
It seems to me that this line should already stop any new defaults for Grid being applied to TickMarks.
(propDefault.ParentType |> Option.forall (fun parentType -> targetType.IsAssignableFrom(parentType) || targetType.IsSubclassOf(parentType)))
If I add the following ChartStyleDefault for Charting.Grid to all chart types then the TickMarks also disappear..
let internal PropertyDefaults =
[ // Define type specific defaults
{ ChartStyleDefault.ChartType = None; ParentParentType=Some(typeof<Charting.Axis>); ParentType = Some(typeof<Charting.Grid>); PropertyName="Enabled"; PropertyDefault=(box false) }