Skip to content

Commit cbe20a1

Browse files
committed
Merge mobile
2 parents 2c2eb0e + fe45815 commit cbe20a1

25 files changed

+780
-130
lines changed

docs/content/3d-surface-plots.fsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ let z' = [
5858
[1.;2.;];
5959
] // column (length y)
6060

61-
Chart.Surface(z',x',y',Opacity=0.,Contours=Contours.initContours(Contours.ContoursStyle.XyzContours(Show=true)))
62-
|> Chart.Show
61+
//Chart.Surface(z',x',y',Opacity=0.,Contours=Contours. init(Contours.styleXyz(Show=true)))
62+
//|> Chart.Show
6363

6464

docs/content/bar-charts.fsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ let keys = ["Product A"; "Product B"; "Product C";]
1919
let labels = ["27% market share"; "24% market share"; "19% market share";]
2020

2121
(*** define-output:bar1 ***)
22-
Chart.Column(keys,values,Labels=labels,Opacity=0.3,Marker=Marker.init(Marker.style (Color="rgba(222,45,38,0.8)",Size=1))) // Changing the thickness of the bar is not possible at the moment
22+
Chart.Column(keys,values,Labels=labels,Opacity=0.3,Marker=Marker.init(Color="rgba(222,45,38,0.8)",Size=1)) // Changing the thickness of the bar is not possible at the moment
2323
(*** include-it:bar1 ***)
24-
|> Chart.Show
24+
2525

2626
(*** define-output:bar2 ***)
2727
Chart.Bar(keys,values)
@@ -42,5 +42,5 @@ The following example shows how to create a stacked bar chart by combining bar c
4242
]
4343
|> Chart.Combine
4444
(*** include-it:bar3 ***)
45-
|> Chart.Show
45+
4646

docs/content/contour-plots.fsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ let z =
4444
z
4545
|> Chart.Contour
4646
|> Chart.withSize(600.,600.)
47-
(*** include-it:contour1 ***)
47+
(*** include-it:contour1 ***)

docs/content/heatmaps.fsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ let colnames = ["Tp0";"Tp30";"Tp60";"Tp160"]
2626

2727
let colorscaleValue =
2828
//StyleParam.ColorScale.Electric
29-
StyleParam.ColorScale.Custom [(0.0,"#3D9970");(1.0,"#001f3f")]
29+
StyleParam.Colorscale.Custom [(0.0,"#3D9970");(1.0,"#001f3f")]
3030
// Generating the Heatmap
3131
(*** define-output:heat1 ***)
3232
Chart.Heatmap(matrix,colnames,rownames,Colorscale=colorscaleValue,Showscale=true)

docs/content/line-scatter-plots.fsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ let y' = [2.; 1.5; 5.; 1.5; 3.; 2.5; 2.5; 1.5; 3.5; 1.]
2121

2222

2323
(*** define-output:line1 ***)
24-
Chart.Line(x,y',Name="line")
24+
Chart.Line(x,y',Name="line",ShowMarkers=true,MarkerSymbol=StyleParam.Symbol.Square)
2525
|> Chart.withLineStyle(Width=2,Dash=StyleParam.DrawingStyle.Dot)
2626
(*** include-it:line1 ***)
2727

@@ -46,7 +46,7 @@ Chart.Spline(x,y',Name="spline")
4646
|> Chart.withLineStyle(Width=2,Dash=StyleParam.DrawingStyle.Dot)
4747
|> Chart.withLineStyle(Width=6,Dash=StyleParam.DrawingStyle.Dot)
4848
(*** include-it:line3 ***)
49-
49+
|> Chart.Show
5050

5151
(**
5252
@@ -62,13 +62,14 @@ let l = ["a";"b";"c";"d";"e";"f";"g";"h";"i";"j";]
6262
(*** define-output:pointsWithLabels ***)
6363
Chart.Point(x,y',Name="points",Labels=l,TextPosition=StyleParam.TextPosition.TopRight)
6464
(*** include-it:pointsWithLabels ***)
65-
|> Chart.Show
6665

6766

6867

69-
//(*** define-output:pointsWithErrorBars ***)
70-
//Chart.Point(x,y',Name="points with errors")
71-
//|> Chart.withXError(Options.Error(Array=[|0.2;0.3;0.2;0.1;0.2;0.4;0.2;0.08;0.2;0.1;|]))
72-
//|> Chart.withYError(Options.Error(Array=[|0.3;0.2;0.1;0.4;0.2;0.4;0.1;0.18;0.02;0.2;|]))
73-
//(*** include-it:pointsWithErrorBars ***)
68+
69+
70+
(*** define-output:pointsWithErrorBars ***)
71+
Chart.Point(x,y',Name="points with errors")
72+
|> Chart.withXErrorStyle (Array=[|0.2;0.3;0.2;0.1;0.2;0.4;0.2;0.08;0.2;0.1;|])
73+
|> Chart.withYErrorStyle (Array=[|0.3;0.2;0.1;0.4;0.2;0.4;0.1;0.18;0.02;0.2;|])
74+
(*** include-it:pointsWithErrorBars ***)
7475
//|> Chart.Show

docs/content/pie-daughnut-charts.fsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Chart.Pie(values,labels)
2222
(*** include-it:pie1 ***)
2323

2424
(*** define-output:doughnut1 ***)
25-
Chart.Doughnut(values,labels,Hole=0.3,Text=labels)
25+
Chart.Doughnut(values,labels,Hole=0.3,Textinfo=labels)
2626
(*** include-it:doughnut1 ***)
2727
|> Chart.Show
2828

docs/content/plotly-wpf.fsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ Create the combined chart
4141
By piping the combined chart into `Chart.Show` function it will be displayed in your browser.
4242
*)
4343
(*** do-not-eval ***)
44-
|> Chart.Show
44+
|> Chart.ShowWPF

docs/content/shapes.fsx

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(*** side ***)
1+
(*** hide ***)
22
#r "../../bin/Newtonsoft.Json.dll"
33
#r "../../bin/FSharp.Plotly.dll"
44

@@ -14,19 +14,11 @@ open FSharp.Plotly
1414
let x = [1.; 2.; 3.; 4.; 5.; 6.; 7.; 8.; 9.; 10.; ]
1515
let y' = [2.; 1.5; 5.; 1.5; 3.; 2.5; 2.5; 1.5; 3.5; 1.]
1616

17-
let s1 =
18-
Shape.init
19-
( Shape.style
20-
( StyleParam.ShapeType.Rectangle,2.,4.,3.,4.,Opacity=0.3,Fillcolor="#d3d3d3" )
21-
)
22-
let s2 =
23-
Shape.init
24-
( Shape.style
25-
( StyleParam.ShapeType.Rectangle,5.,7.,3.,4.,Opacity=0.3,Fillcolor="#d3d3d3" )
26-
)
27-
(*** define-output:line1 ***)
17+
let s1 = Shape.init (StyleParam.ShapeType.Rectangle,2.,4.,3.,4.,Opacity=0.3,Fillcolor="#d3d3d3")
18+
let s2 = Shape.init (StyleParam.ShapeType.Rectangle,5.,7.,3.,4.,Opacity=0.3,Fillcolor="#d3d3d3")
19+
(*** define-output:shapes ***)
2820
Chart.Line(x,y',Name="line")
29-
//|> Chart.withShape(Options.Shape(StyleParam.ShapeType.Rectangle,2.,4.,3.,4.,Opacity=0.3,Fillcolor="#d3d3d3"))
21+
//|> Chart.withShape(Options.Shape(StyleOption.ShapeType.Rectangle,2.,4.,3.,4.,Opacity=0.3,Fillcolor="#d3d3d3"))
3022
|> Chart.withShapes([s1;s2])
31-
(*** include-it:line1 ***)
23+
(*** include-it:shapes ***)
3224

src/FSharp.Plotly/Axis.fs

Lines changed: 114 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,122 @@ module Axis =
88
inherit DynamicObj ()
99

1010
/// Init LinearAxis type
11-
static member init (applyStyle:LinearAxis->LinearAxis) =
12-
LinearAxis() |> applyStyle
11+
static member init
12+
(
13+
?AxisType ,
14+
?Title ,
15+
?Titlefont ,
16+
?Autorange ,
17+
?Rangemode ,
18+
?Range ,
19+
?Fixedrange ,
20+
?Tickmode ,
21+
?nTicks ,
22+
?Tick0 ,
23+
?dTick ,
24+
?Tickvals ,
25+
?Ticktext ,
26+
?Ticks ,
27+
?Mirror ,
28+
?Ticklen ,
29+
?Tickwidth ,
30+
?Tickcolor ,
31+
?Showticklabels ,
32+
?Tickfont ,
33+
?Tickangle ,
34+
?Tickprefix ,
35+
?Showtickprefix ,
36+
?Ticksuffix ,
37+
?Showticksuffix ,
38+
?Showexponent ,
39+
?Exponentformat ,
40+
?Tickformat ,
41+
?Hoverformat ,
42+
?Showline ,
43+
?Linecolor ,
44+
?Linewidth ,
45+
?Showgrid ,
46+
?Gridcolor ,
47+
?Gridwidth ,
48+
?Zeroline ,
49+
?Zerolinecolor ,
50+
?Zerolinewidth ,
51+
?Anchor ,
52+
?Side ,
53+
?Overlaying ,
54+
?Domain ,
55+
?Position ,
56+
?IsSubplotObj ,
57+
?Tickvalssrc ,
58+
?Ticktextsrc ,
59+
?Showspikes ,
60+
?Spikesides ,
61+
?Spikethickness ,
62+
?Spikecolor ,
63+
?Showbackground ,
64+
?Backgroundcolor,
65+
?Showaxeslabels
66+
) =
67+
LinearAxis()
68+
|> LinearAxis.style
69+
(
70+
?AxisType = AxisType ,
71+
?Title = Title ,
72+
?Titlefont = Titlefont ,
73+
?Autorange = Autorange ,
74+
?Rangemode = Rangemode ,
75+
?Range = Range ,
76+
?Fixedrange = Fixedrange ,
77+
?Tickmode = Tickmode ,
78+
?nTicks = nTicks ,
79+
?Tick0 = Tick0 ,
80+
?dTick = dTick ,
81+
?Tickvals = Tickvals ,
82+
?Ticktext = Ticktext ,
83+
?Ticks = Ticks ,
84+
?Mirror = Mirror ,
85+
?Ticklen = Ticklen ,
86+
?Tickwidth = Tickwidth ,
87+
?Tickcolor = Tickcolor ,
88+
?Showticklabels = Showticklabels ,
89+
?Tickfont = Tickfont ,
90+
?Tickangle = Tickangle ,
91+
?Tickprefix = Tickprefix ,
92+
?Showtickprefix = Showtickprefix ,
93+
?Ticksuffix = Ticksuffix ,
94+
?Showticksuffix = Showticksuffix ,
95+
?Showexponent = Showexponent ,
96+
?Exponentformat = Exponentformat ,
97+
?Tickformat = Tickformat ,
98+
?Hoverformat = Hoverformat ,
99+
?Showline = Showline ,
100+
?Linecolor = Linecolor ,
101+
?Linewidth = Linewidth ,
102+
?Showgrid = Showgrid ,
103+
?Gridcolor = Gridcolor ,
104+
?Gridwidth = Gridwidth ,
105+
?Zeroline = Zeroline ,
106+
?Zerolinecolor = Zerolinecolor ,
107+
?Zerolinewidth = Zerolinewidth ,
108+
?Anchor = Anchor ,
109+
?Side = Side ,
110+
?Overlaying = Overlaying ,
111+
?Domain = Domain ,
112+
?Position = Position ,
113+
?IsSubplotObj = IsSubplotObj ,
114+
?Tickvalssrc = Tickvalssrc ,
115+
?Ticktextsrc = Ticktextsrc ,
116+
?Showspikes = Showspikes ,
117+
?Spikesides = Spikesides ,
118+
?Spikethickness = Spikethickness ,
119+
?Spikecolor = Spikecolor ,
120+
?Showbackground = Showbackground ,
121+
?Backgroundcolor = Backgroundcolor,
122+
?Showaxeslabels = Showaxeslabels
123+
)
13124

14125
// Applies the styles to LinearAxis()
15-
static member LinearAxis
126+
static member style
16127
(
17128
?AxisType,
18129
?Title,

src/FSharp.Plotly/Bins.fs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,26 @@ type Bins () =
66
inherit DynamicObj ()
77

88
// Init Bins()
9-
static member init (apply:Bins->Bins) =
10-
Bins () |> apply
9+
static member init
10+
(
11+
?StartBins ,
12+
?EndBins ,
13+
?Size
14+
) =
15+
Bins ()
16+
|> Bins.style
17+
(
18+
?StartBins = StartBins,
19+
?EndBins = EndBins ,
20+
?Size = Size
21+
)
1122

1223

1324
// Applies the styles to Bins()
1425
static member style
1526
(
1627
?StartBins:float,
17-
?EndBins:float,
28+
?EndBins :float,
1829
?Size
1930
) =
2031

0 commit comments

Comments
 (0)