Skip to content

Commit f20ff81

Browse files
authored
update to plotly v5.0 (#31)
* update * fix compile * short run * update dependencies ---------
1 parent 628f6b6 commit f20ff81

File tree

8 files changed

+26
-26
lines changed

8 files changed

+26
-26
lines changed

Benchly.Benchmarks/Benchly.Benchmarks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="BenchmarkDotNet" Version="0.13.10" />
11+
<PackageReference Include="BenchmarkDotNet" Version="0.14.0" />
1212
</ItemGroup>
1313

1414
<ItemGroup>

Benchly.Benchmarks/Md5VsSha256.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Benchly.Benchmarks
88
[ColumnChart(Title = "Column Chart ({JOB})", Colors = "skyblue,slateblue", Height =800, Output = OutputMode.PerJob)]
99
[Histogram(Width=500)]
1010
[Timeline(Width = 500)]
11-
[MemoryDiagnoser, SimpleJob(RuntimeMoniker.Net60), SimpleJob(RuntimeMoniker.Net48)]
11+
[MemoryDiagnoser, ShortRunJob(RuntimeMoniker.Net60), ShortRunJob(RuntimeMoniker.Net48)]
1212
public class Md5VsSha256
1313
{
1414
private const int N = 10000;

Benchly.Benchmarks/Md5VsSha256Params.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Benchly.Benchmarks
88
[ColumnChart(Title = "Hashing ({METHOD})", Output=OutputMode.PerMethod)]
99
[Histogram]
1010
[Timeline]
11-
[MemoryDiagnoser, SimpleJob(RuntimeMoniker.Net60), SimpleJob(RuntimeMoniker.Net48)]
11+
[MemoryDiagnoser, ShortRunJob(RuntimeMoniker.Net60), ShortRunJob(RuntimeMoniker.Net48)]
1212
public class Md5VsSha256Params
1313
{
1414
private byte[] data;

Benchly.UnitTests/Benchly.UnitTests.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<LangVersion>10.0</LangVersion>
@@ -11,14 +11,14 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="FluentAssertions" Version="6.12.0" />
15-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
16-
<PackageReference Include="xunit" Version="2.4.2" />
17-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
14+
<PackageReference Include="FluentAssertions" Version="6.12.2" />
15+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
16+
<PackageReference Include="xunit" Version="2.9.2" />
17+
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
1818
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1919
<PrivateAssets>all</PrivateAssets>
2020
</PackageReference>
21-
<PackageReference Include="coverlet.collector" Version="3.2.0">
21+
<PackageReference Include="coverlet.collector" Version="6.0.2">
2222
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2323
<PrivateAssets>all</PrivateAssets>
2424
</PackageReference>

Benchly/Benchly.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
<PackageLicenseFile>LICENSE</PackageLicenseFile>
1414
<PackageReadmeFile>README.md</PackageReadmeFile>
1515
<PackageId>Benchly</PackageId>
16-
<Version>0.6.1</Version>
17-
<AssemblyVersion>0.6.1.0</AssemblyVersion>
18-
<FileVersion>0.6.1.0</FileVersion>
16+
<Version>0.7.0</Version>
17+
<AssemblyVersion>0.7.0.0</AssemblyVersion>
18+
<FileVersion>0.7.0.0</FileVersion>
1919
<GenerateDocumentationFile>true</GenerateDocumentationFile>
2020
<IncludeSource>True</IncludeSource>
2121
<IncludeSymbols>True</IncludeSymbols>
@@ -24,8 +24,8 @@
2424
</PropertyGroup>
2525

2626
<ItemGroup>
27-
<PackageReference Include="BenchmarkDotNet" Version="0.13.10" />
28-
<PackageReference Include="Plotly.NET.ImageExport" Version="5.0.1" />
27+
<PackageReference Include="BenchmarkDotNet" Version="0.14.0" />
28+
<PackageReference Include="Plotly.NET.ImageExport" Version="6.1.0" />
2929
</ItemGroup>
3030

3131
<ItemGroup>

Benchly/BoxPlotExporter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public IEnumerable<string> ExportToFiles(Summary summary, ILogger consoleLogger)
3232

3333
// https://www.geeksforgeeks.org/how-to-create-grouped-box-plot-in-plotly/
3434
// For this to group, we must invoke Chart2D.Chart.BoxPlot once per group
35-
var charts = new List<GenericChart.GenericChart>();
35+
var charts = new List<GenericChart>();
3636
foreach (var job in jobs)
3737
{
3838
var names = job.SelectMany(p => p.Names).ToArray();

Benchly/ColumnChartRenderer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ public static void Render(IEnumerable<SubPlot> subPlot, string title, string fil
109109

110110
// make a grid with 1 row, n columns, where n is number of params
111111
// y axis only on first chart
112-
var gridCharts = new List<GenericChart.GenericChart>();
112+
var gridCharts = new List<GenericChart>();
113113

114114
int paramCount = 0;
115115
foreach (var plot in subPlot)
116116
{
117117
ColorMap.Fill(plot.Traces, colors);
118-
var charts = new List<GenericChart.GenericChart>();
118+
var charts = new List<GenericChart>();
119119

120120
// Group the legends, then only show the first for each group
121121
// https://stackoverflow.com/questions/60751008/sharing-same-legends-for-subplots-in-plotly
@@ -151,7 +151,7 @@ public static void Render(IEnumerable<SubPlot> subPlot, string title, string fil
151151
var pattern = new FSharpOption<LayoutGridPattern>(LayoutGridPattern.Coupled);
152152

153153
Chart
154-
.Grid<IEnumerable<GenericChart.GenericChart>>(1, subPlot.Count(), Pattern: pattern).Invoke(gridCharts)
154+
.Grid<IEnumerable<string>, IEnumerable<GenericChart>>(1, subPlot.Count(), Pattern: pattern).Invoke(gridCharts)
155155
.WithAnnotations(annotations)
156156
.WithoutVerticalGridlines()
157157
.WithAxisTitles($"Time ({timeUnit})")

Benchly/PlotExtensions.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,33 @@ namespace Benchly
77
{
88
internal static class PlotExtensions
99
{
10-
public static GenericChart.GenericChart WithAxisTitles(this GenericChart.GenericChart chart, string yTitle)
10+
public static GenericChart WithAxisTitles(this GenericChart chart, string yTitle)
1111
{
1212
var font = new FSharpOption<Font>(Font.init(Size: new FSharpOption<double>(16)));
1313
FSharpOption<string> yt = new FSharpOption<string>(yTitle);
1414
return chart.WithXAxisStyle(Title.init(Font: font)).WithYAxisStyle(Title.init(yt, Font: font));
1515
}
1616

17-
public static GenericChart.GenericChart WithAxisTitles(this GenericChart.GenericChart chart, string xTitle, string yTitle)
17+
public static GenericChart WithAxisTitles(this GenericChart chart, string xTitle, string yTitle)
1818
{
1919
var font = new FSharpOption<Font>(Font.init(Size: new FSharpOption<double>(16)));
2020
FSharpOption<string> xt = new FSharpOption<string>(xTitle);
2121
FSharpOption<string> yt = new FSharpOption<string>(yTitle);
2222
return chart.WithXAxisStyle(Title.init(xt, Font: font)).WithYAxisStyle(Title.init(yt, Font: font));
2323
}
2424

25-
public static GenericChart.GenericChart WithoutVerticalGridlines(this GenericChart.GenericChart chart)
25+
public static GenericChart WithoutVerticalGridlines(this GenericChart chart)
2626
{
2727
var gridColor = new FSharpOption<Color>(Color.fromKeyword(ColorKeyword.Gainsboro));
28-
var yaxis = LinearAxis.init<IConvertible, IConvertible, IConvertible, IConvertible, IConvertible, IConvertible>(
28+
var yaxis = LinearAxis.init<IConvertible, IConvertible, IConvertible, IConvertible, IConvertible, IConvertible, IConvertible, IConvertible>(
2929
GridColor: gridColor,
3030
ZeroLineColor: gridColor);
3131

32-
var axis = LinearAxis.init<IConvertible, IConvertible, IConvertible, IConvertible, IConvertible, IConvertible>(ShowGrid: new FSharpOption<bool>(false));
32+
var axis = LinearAxis.init<IConvertible, IConvertible, IConvertible, IConvertible, IConvertible, IConvertible, IConvertible, IConvertible>(ShowGrid: new FSharpOption<bool>(false));
3333
return chart.WithXAxis(axis).WithYAxis(yaxis);
3434
}
3535

36-
public static GenericChart.GenericChart WithLayout(this GenericChart.GenericChart chart, string title)
36+
public static GenericChart WithLayout(this GenericChart chart, string title)
3737
{
3838
var font = new FSharpOption<Font>(Font.init(Size: new FSharpOption<double>(24)));
3939
FSharpOption<Title> t = Title.init(Text: title, X: 0.5, Font: font);
@@ -42,13 +42,13 @@ public static GenericChart.GenericChart WithLayout(this GenericChart.GenericChar
4242
return chart.WithLayout(layout);
4343
}
4444

45-
public static GenericChart.GenericChart WithGroupBox(this GenericChart.GenericChart chart)
45+
public static GenericChart WithGroupBox(this GenericChart chart)
4646
{
4747
Layout layout = Layout.init<IConvertible>(BoxMode: BoxMode.Group);
4848
return chart.WithLayout(layout);
4949
}
5050

51-
public static GenericChart.GenericChart WithLegendGroup(this GenericChart.GenericChart chart, string groupName, bool showLegend)
51+
public static GenericChart WithLegendGroup(this GenericChart chart, string groupName, bool showLegend)
5252
{
5353
return chart.WithTraceInfo(LegendGroup: new FSharpOption<string>(groupName), ShowLegend: new FSharpOption<bool>(showLegend));
5454
}

0 commit comments

Comments
 (0)