Skip to content

Commit 4dc71c0

Browse files
committed
Round 3d Line data for stable testing
1 parent 7187d07 commit 4dc71c0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/Plotly.NET.Tests/HtmlCodegen/Charts3D.fs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ let lineChart =
3939
let i' = float i
4040
let r = 10. * Math.Cos (i' / 10.)
4141
(r * Math.Cos i', r * Math.Sin i', i')
42+
|> fun (x,y,z) ->
43+
Math.Round(x,3),
44+
Math.Round(y,3),
45+
Math.Round(z,3)
4246
)
4347
|> List.unzip3
4448

@@ -53,7 +57,7 @@ let lineChart =
5357
let ``Line charts`` =
5458
testList "Charts3D.Line charts" [
5559
testCase "Line data" ( fun () ->
56-
"""var data = [{"type":"scatter3d","mode":"lines+markers","x":[10.0,8.764858122060915,5.3760304484812105,0.699428991431538,-4.078516059742164,-7.762380006776013,-9.457759559629629,-8.796818588044248,-6.020456431562834,-1.8981046678556164,2.4893698743024015,6.041583606256742,7.924627339505819,7.774455867055686,5.766162492106399,2.5362920361842747,-1.0137084976470045,-3.9731770939413367,-5.663676531805762,-5.800381805436716,-4.533522819483132,-2.3661340757417872,0.020074794419808174,1.9742392407015044,3.0577702559255746,3.1462811058452385,2.427409510770794,1.302916035546942,0.23240834306912295,-0.42769357063721014,-0.5373819709641076],"y":[0.0,4.788263815209447,8.372671348444594,9.862941931402888,8.911720173488927,5.798670944701264,1.3481709304529075,-3.2951619221615798,-6.970612585921842,-8.802141619140079,-8.415352216177444,-6.014904288506064,-2.306115620213046,1.7125353726077581,5.024910671806752,6.86324142009979,6.892925283704576,5.269880365378672,2.561769585348826,-0.43714135926897707,-2.9393586065447344,-4.37711141115013,-4.535916791549611,-3.576112184549465,-1.9443135767963393,-0.2091277735131711,1.123941901777903,1.7603416439605064,1.6837070198341995,1.1265744325858227,0.4599954209124893],"z":[0.0,0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,8.0,8.5,9.0,9.5,10.0,10.5,11.0,11.5,12.0,12.5,13.0,13.5,14.0,14.5,15.0],"line":{},"marker":{}}];"""
60+
"""var data = [{"type":"scatter3d","mode":"lines+markers","x":[10.0,8.765,5.376,0.699,-4.079,-7.762,-9.458,-8.797,-6.02,-1.898,2.489,6.042,7.925,7.774,5.766,2.536,-1.014,-3.973,-5.664,-5.8,-4.534,-2.366,0.02,1.974,3.058,3.146,2.427,1.303,0.232,-0.428,-0.537],"y":[0.0,4.788,8.373,9.863,8.912,5.799,1.348,-3.295,-6.971,-8.802,-8.415,-6.015,-2.306,1.713,5.025,6.863,6.893,5.27,2.562,-0.437,-2.939,-4.377,-4.536,-3.576,-1.944,-0.209,1.124,1.76,1.684,1.127,0.46],"z":[0.0,0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,8.0,8.5,9.0,9.5,10.0,10.5,11.0,11.5,12.0,12.5,13.0,13.5,14.0,14.5,15.0],"line":{},"marker":{}}];"""
5761
|> chartGeneratedContains lineChart
5862
);
5963
testCase "Line layout" ( fun () ->

0 commit comments

Comments
 (0)