Skip to content

Commit

Permalink
mdd-exported-from
Browse files Browse the repository at this point in the history
  • Loading branch information
mddifilippo89 committed Jan 2, 2024
1 parent accd8b6 commit 61a5298
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 37 deletions.
47 changes: 27 additions & 20 deletions samples/charts/toolbar/download-data-chart-as-image/App.razor
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,19 @@
Orientation="ToolbarOrientation.Horizontal"
OnCommand="ToolbarDownloadChart">
<IgbToolActionIconButton
Name="DownloadChartImageLabel"
@ref="downloadChartImage"
Title="Download as Image"
OverlayId="CopyAsImage"
CommandId="DownloadAsImage">
Name="DownloadChartImage"
@ref="downloadChartImage"
Title="Download as Image"
OverlayId="CopyAsImage"
CommandId="DownloadAsImage">
</IgbToolActionIconButton>

</IgbToolbar>

</div>
<div id="aboveContentRightContainer">
<!-- insert aboveContentRight -->
<!-- end aboveContentRight -->
</div>
</div>
<div class="container vertical fill">
Expand All @@ -33,14 +39,14 @@
DataSource="CountryRenewableElectricity"
Label="Year">
</IgbCategoryXAxis>

<IgbNumericYAxis
Name="yAxis"
@ref="yAxis"
Title="TWh"
LabelLocation="AxisLabelsLocation.OutsideRight">
</IgbNumericYAxis>

<IgbLineSeries
Name="LineSeries1"
@ref="lineSeries1"
Expand All @@ -50,7 +56,7 @@
DataSource="CountryRenewableElectricity"
ValueMemberPath="America">
</IgbLineSeries>

<IgbLineSeries
Name="LineSeries2"
@ref="lineSeries2"
Expand All @@ -60,7 +66,7 @@
DataSource="CountryRenewableElectricity"
ValueMemberPath="Europe">
</IgbLineSeries>

<IgbLineSeries
Name="LineSeries3"
@ref="lineSeries3"
Expand All @@ -70,9 +76,9 @@
DataSource="CountryRenewableElectricity"
ValueMemberPath="China">
</IgbLineSeries>

</IgbDataChart>

</div>
</div>

Expand Down Expand Up @@ -107,28 +113,29 @@
private IgbLineSeries lineSeries2;
private IgbLineSeries lineSeries3;


public void ToolbarDownloadChart(IgbToolCommandEventArgs args)
{
var target = this.chart;
switch (args.Command.CommandId)
{
case "DownloadAsImage":
JS.InvokeVoidAsync("renderChartToImage", null);
break;
var target = this.chart;
switch (args.Command.CommandId)
{
case "DownloadAsImage":
JS.InvokeVoidAsync("renderChartToImage", null);
break;
}
}

private CountryRenewableElectricity _countryRenewableElectricity = null;
public CountryRenewableElectricity CountryRenewableElectricity
{
get
{
if (_countryRenewableElectricity == null)
{
_countryRenewableElectricity = new CountryRenewableElectricity();
_countryRenewableElectricity = new CountryRenewableElectricity();
}
return _countryRenewableElectricity;
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<PackageReference Include="IgniteUI.Blazor" Version="23.2.107" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0" />
<PackageReference Include="System.Net.Http.Json" Version="6.0.0" />
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
</ItemGroup>

</Project>
12 changes: 6 additions & 6 deletions samples/charts/toolbar/download-data-chart-as-image/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ public static async Task Main(string[] args)
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
// registering Ignite UI modules
builder.Services.AddIgniteUIBlazor(
typeof(IgbToolbarModule),
typeof(IgbDataChartToolbarModule),
typeof(IgbDataChartCoreModule),
typeof(IgbDataChartCategoryModule),
typeof(IgbDataChartAnnotationModule),
typeof(IgbDataChartInteractivityModule),
typeof(IgbToolbarModule),
typeof(IgbDataChartToolbarModule),
typeof(IgbDataChartCoreModule),
typeof(IgbDataChartCategoryModule),
typeof(IgbDataChartAnnotationModule),
typeof(IgbDataChartInteractivityModule),
typeof(IgbDataChartCategoryTrendLineModule)
);
await builder.Build().RunAsync();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:4200",
"sslPort": 44385
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"nativeDebugging": true
}
},
"BlazorSamples": {
"commandName": "Project",
Expand All @@ -16,13 +23,5 @@
},
"applicationUrl": "https://localhost:5001;http://localhost:4200"
}
},
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:4200",
"sslPort": 44385
}
}
}

0 comments on commit 61a5298

Please sign in to comment.