You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/Plotly.NET.Tests/HtmlCodegen/SimpleCharts.fs
+31-6Lines changed: 31 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -468,8 +468,8 @@ let heatmap1Chart =
468
468
469
469
Chart.Heatmap(
470
470
matrix,colnames,rownames,
471
-
Colorscale=colorscaleValue,
472
-
Showscale=true,
471
+
ColorScale=colorscaleValue,
472
+
ShowScale=true,
473
473
UseDefaults =false
474
474
)
475
475
|> Chart.withSize(700,500)
@@ -489,8 +489,8 @@ let heatmapStyledChart =
489
489
490
490
Chart.Heatmap(
491
491
matrix,colnames,rownames,
492
-
Colorscale=colorscaleValue,
493
-
Showscale=true,
492
+
ColorScale=colorscaleValue,
493
+
ShowScale=true,
494
494
UseDefaults =false
495
495
)
496
496
|> Chart.withSize(700.,500.)
@@ -501,26 +501,51 @@ let heatmapStyledChart =
501
501
)
502
502
)
503
503
504
+
letannotatedheatmap=
505
+
Chart.AnnotatedHeatmap(
506
+
zData =[
507
+
[1..5]
508
+
[6..10]
509
+
[11..15]
510
+
],
511
+
annotationText =[
512
+
["1,1";"1,2";"1,3"]
513
+
["2,1";"2,2";"2,3"]
514
+
["3,1";"3,2";"3,3"]
515
+
],
516
+
X =["C1";"C2";"C3"],
517
+
Y =["R1";"R2";"R3"],
518
+
ReverseYAxis =true,
519
+
UseDefaults =false
520
+
)
504
521
505
522
[<Tests>]
506
523
let``Heatmap charts`` =
507
524
testList "SimpleCharts.Heatmap charts"[
508
525
testCase "Heatmap data"(fun()->
509
-
"var data = [{\"type\":\"heatmap\",\"z\":[[1.0,1.5,0.7,2.7],[2.0,0.5,1.2,1.4],[0.1,2.6,2.4,3.0]],\"x\":[\"Tp0\",\"Tp30\",\"Tp60\",\"Tp160\"],\"y\":[\"p3\",\"p2\",\"p1\"],\"colorscale\":[[0.0,\"#3D9970\"],[1.0,\"#001f3f\"]],\"showscale\":true}];"
526
+
"""var data = [{"type":"heatmap","x":["Tp0","Tp30","Tp60","Tp160"],"y":["p3","p2","p1"],"z":[[1.0,1.5,0.7,2.7],[2.0,0.5,1.2,1.4],[0.1,2.6,2.4,3.0]],"colorscale":[[0.0,"#3D9970"],[1.0,"#001f3f"]],"showscale":true}];"""
"""var data = [{"type":"heatmap","z":[[1.0,1.5,0.7,2.7],[2.0,0.5,1.2,1.4],[0.1,2.6,2.4,3.0]],"x":["Tp0","Tp30","Tp60","Tp160"],"y":["p3","p2","p1"],"colorscale":[[0.0,"#3D9970"],[1.0,"#001f3f"]],"showscale":true,"colorbar":{"title":{"text":"Im the Colorbar"}}}]"""
534
+
"""var data = [{"type":"heatmap","x":["Tp0","Tp30","Tp60","Tp160"],"y":["p3","p2","p1"],"z":[[1.0,1.5,0.7,2.7],[2.0,0.5,1.2,1.4],[0.1,2.6,2.4,3.0]],"colorscale":[[0.0,"#3D9970"],[1.0,"#001f3f"]],"showscale":true,"colorbar":{"title":{"text":"Im the Colorbar"}}}];"""
0 commit comments