|
| 1 | +module CoreTests.HTMLCodegen.ChartTernary |
| 2 | + |
| 3 | +open Expecto |
| 4 | +open Plotly.NET |
| 5 | +open Plotly.NET.LayoutObjects |
| 6 | +open Plotly.NET.TraceObjects |
| 7 | +open Plotly.NET.GenericChart |
| 8 | + |
| 9 | +open TestUtils.HtmlCodegen |
| 10 | +open ChartTernaryTestCharts |
| 11 | + |
| 12 | +module ScatterTernary = |
| 13 | + [<Tests>] |
| 14 | + let ``ScatterTernary chart HTML codegeneration tests`` = |
| 15 | + testList "HTMLCodegen.ChartTernary" [ |
| 16 | + testList "ScatterTernary" [ |
| 17 | + ] |
| 18 | + ] |
| 19 | + |
| 20 | +module PointTernary = |
| 21 | + [<Tests>] |
| 22 | + let ``PointTernary chart HTML codegeneration tests`` = |
| 23 | + testList "HTMLCodegen.ChartTernary" [ |
| 24 | + testList "PointTernary" [ |
| 25 | + testCase "Point data" ( fun () -> |
| 26 | + """var data = [{"type":"scatterternary","mode":"markers","a":[1],"b":[2],"c":[3],"marker":{},"line":{}}];""" |
| 27 | + |> chartGeneratedContains PointTernary.``Styled ternary point chart`` |
| 28 | + ) |
| 29 | + testCase "Point layout" ( fun () -> |
| 30 | + """var layout = {"ternary":{"aaxis":{"color":"rgba(153, 50, 204, 1.0)","title":{"text":"A"}},"baxis":{"color":"rgba(139, 0, 0, 1.0)","title":{"text":"B"}},"caxis":{"color":"rgba(0, 139, 139, 1.0)","title":{"text":"C"}}}};""" |
| 31 | + |> chartGeneratedContains PointTernary.``Styled ternary point chart`` |
| 32 | + ) |
| 33 | + ] |
| 34 | + ] |
| 35 | + |
| 36 | +module LineTernary = |
| 37 | + [<Tests>] |
| 38 | + let ``LineTernary chart HTML codegeneration tests`` = |
| 39 | + testList "HTMLCodegen.ChartTernary" [ |
| 40 | + testList "LineTernary" [ |
| 41 | + testCase "Line data" ( fun () -> |
| 42 | + """var data = [{"type":"scatterternary","mode":"lines+markers","a":[10,20,30,40,50,60,70,80],"b":[80,70,60,50,40,30,20,10],"marker":{},"line":{"dash":"dashdot"},"sum":100}];""" |
| 43 | + |> chartGeneratedContains LineTernary.``Styled ternary line chart`` |
| 44 | + ) |
| 45 | + testCase "Line layout" ( fun () -> |
| 46 | + """var layout = {"ternary":{"aaxis":{"color":"rgba(153, 50, 204, 1.0)"},"baxis":{"color":"rgba(139, 0, 0, 1.0)"},"caxis":{"color":"rgba(0, 139, 139, 1.0)"}}};""" |
| 47 | + |> chartGeneratedContains LineTernary.``Styled ternary line chart`` |
| 48 | + ) |
| 49 | + ] |
| 50 | + ] |
| 51 | + |
| 52 | +module BubbleTernary = |
| 53 | + [<Tests>] |
| 54 | + let ``BubbleTernary chart HTML codegeneration tests`` = |
| 55 | + testList "HTMLCodegen.ChartTernary" [ |
| 56 | + testList "BubbleTernary" [ |
| 57 | + ] |
| 58 | + ] |
0 commit comments