11(**
22---
3- title: single and sulti arguments
3+ title: Single and multi arguments
44category: General
55categoryindex: 1
66index: 7
@@ -21,7 +21,7 @@ index: 7
2121#endif // IPYNB
2222
2323(**
24- # Single and sulti arguments
24+ # Single and multi arguments
2525
2626[ ![ Binder] ( {{root}}img/badge-binder.svg )] ( https://mybinder.org/v2/gh/plotly/Plotly.NET/gh-pages?filepath={{fsdocs-source-basename}}.ipynb ) &emsp ;
2727[ ![ Script] ( {{root}}img/badge-script.svg )] ( {{root}}{{fsdocs-source-basename}}.fsx ) &emsp ;
@@ -41,13 +41,18 @@ Here is an example for bar charts:
4141*)
4242open Plotly.NET
4343
44- let bar =
44+ let bar1 =
4545 Chart.Bar(
4646 [
4747 " first" , 1
4848 " second" , 2
4949 " third" , 3
5050 ],
51+ MarkerColor = Color.fromColors [ // one color for each individual bar
52+ Color.fromKeyword Salmon
53+ Color.fromKeyword SteelBlue
54+ Color.fromKeyword Azure
55+ ],
5156 MultiMarkerPatternShape = [ // individual pattern shape for each bar
5257 StyleParam.PatternShape.DiagonalAscending
5358 StyleParam.PatternShape.Dots
@@ -59,14 +64,50 @@ let bar =
5964 " second bar"
6065 " third bar"
6166 ],
62- TextPosition = StyleParam.TextPosition.Outside // Textposition for every text item associated with this trace
67+ TextPosition = StyleParam.TextPosition.Inside // Textposition for every text item associated with this trace
68+ )
69+
70+ (* ** condition: ipynb ***)
71+ #if IPYNB
72+ bar1
73+ #endif // IPYNB
74+
75+ (* **hide***)
76+ bar1 |> GenericChart.toChartHTML
77+ (* **include-it-raw***)
78+
79+ (**
80+ Here is the exact opposite chart to the above, with single values for multi and vice versa
81+ *)
82+
83+ let bar2 =
84+ Chart.Bar(
85+ [
86+ " first" , 1
87+ " second" , 2
88+ " third" , 3
89+ ],
90+ MarkerColor = Color.fromKeyword Salmon, // one color for every bar
91+ MarkerPatternShape = StyleParam.PatternShape.DiagonalAscending, // one pattern shape for the whole trace
92+ MultiOpacity = [ 0.75 ; 0.5 ; 0.25 ], //Different opacity for each bar
93+ Text = " its a bar" , // one text item for the whole trace
94+ MultiTextPosition = [ // Textposition for every individual text item associated with this trace
95+ StyleParam.TextPosition.Outside
96+ StyleParam.TextPosition.Inside
97+ StyleParam.TextPosition.Outside
98+ ]
6399 )
64100
65101(* ** condition: ipynb ***)
66102#if IPYNB
67- bar
103+ bar2
68104#endif // IPYNB
69105
70106(* **hide***)
71- bar |> GenericChart.toChartHTML
107+ bar2 |> GenericChart.toChartHTML
72108(* **include-it-raw***)
109+
110+ bar1
111+ |> Chart.show
112+ bar2
113+ |> Chart.show
0 commit comments