Blazor Toolbar 구성 요소는 주로 차트 구성 요소와 함께 사용되는 UI 작업을 위한 동반 컨테이너입니다. 툴바는 IgbDataChart 또는 IgbCategoryChart 구성 요소에 연결될 때 속성 및 도구 항목의 사전 설정으로 동적으로 업데이트됩니다. 프로젝트에 대한 사용자 정의 도구를 만들어 최종 사용자가 변경 사항을 제공할 수 있으므로 무한한 양의 사용자 정의가 가능합니다.
Blazor Toolbar Example
EXAMPLE
DATA
MODULES
RAZOR
CSS
using System;
using System.Collections.Generic;
publicclassCountryRenewableElectricityItem
{
publicstring Year { get; set; }
publicdouble Europe { get; set; }
publicdouble China { get; set; }
publicdouble America { get; set; }
}
publicclassCountryRenewableElectricity
: List<CountryRenewableElectricityItem>
{
publicCountryRenewableElectricity()
{
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2009",
Europe = 34,
China = 21,
America = 19
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2010",
Europe = 43,
China = 26,
America = 24
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2011",
Europe = 66,
China = 29,
America = 28
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2012",
Europe = 69,
China = 32,
America = 26
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2013",
Europe = 58,
China = 47,
America = 38
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2014",
Europe = 40,
China = 46,
America = 31
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2015",
Europe = 78,
China = 50,
America = 19
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2016",
Europe = 13,
China = 90,
America = 52
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2017",
Europe = 78,
China = 132,
America = 50
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2018",
Europe = 40,
China = 134,
America = 34
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2018",
Europe = 40,
China = 134,
America = 34
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2019",
Europe = 80,
China = 96,
America = 38
});
}
}cs
using System;
using System.Net.Http;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Text;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using IgniteUI.Blazor.Controls; // for registering Ignite UI modulesnamespaceInfragistics.Samples
{
publicclassProgram
{
publicstaticasync Task Main(string[] args)
{
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("app");
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
// registering Ignite UI modules
builder.Services.AddIgniteUIBlazor(
typeof(IgbLegendModule),
typeof(IgbToolbarModule),
typeof(IgbCategoryChartModule),
typeof(IgbCategoryChartToolbarModule),
typeof(IgbCheckboxListModule)
);
await builder.Build().RunAsync();
}
}
}cs
IgbToolbar 구성 요소에 스타일을 적용하려면 추가 CSS 파일을 연결해야 합니다. 다음은 Blazor Web Assembly 프로젝트의 wwwroot/index.html 파일이나 Blazor Server 프로젝트의 Pages/_Host.cshtml 파일에 배치해야 합니다.
다음 예제에서는 몇 가지 기능을 보여 줍니다. 먼저 도구를 그룹화할 수 있습니다. IgbToolActionSubPanel 다음과 같은 내장 도구 숨기기를 포함합니다. 줌리셋 그리고 분석메뉴 메뉴 도구 작업. 이 예에서는 의 새 인스턴스가 있습니다. 줌리셋 도구 작업이 추가되어 줌메뉴를 사용하여 AfterId 속성을 할당하고 축소. 또한 를 통해 강조 표시됩니다. IsHighlighted 속성을 사용합니다. 이렇게 하면 새 재설정 도구가 맨 아래에 즉시 표시됩니다. 줌메뉴.
EXAMPLE
DATA
MODULES
RAZOR
CSS
using System;
using System.Collections.Generic;
publicclassCountryRenewableElectricityItem
{
publicstring Year { get; set; }
publicdouble Europe { get; set; }
publicdouble China { get; set; }
publicdouble America { get; set; }
}
publicclassCountryRenewableElectricity
: List<CountryRenewableElectricityItem>
{
publicCountryRenewableElectricity()
{
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2009",
Europe = 34,
China = 21,
America = 19
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2010",
Europe = 43,
China = 26,
America = 24
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2011",
Europe = 66,
China = 29,
America = 28
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2012",
Europe = 69,
China = 32,
America = 26
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2013",
Europe = 58,
China = 47,
America = 38
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2014",
Europe = 40,
China = 46,
America = 31
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2015",
Europe = 78,
China = 50,
America = 19
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2016",
Europe = 13,
China = 90,
America = 52
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2017",
Europe = 78,
China = 132,
America = 50
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2018",
Europe = 40,
China = 134,
America = 34
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2018",
Europe = 40,
China = 134,
America = 34
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2019",
Europe = 80,
China = 96,
America = 38
});
}
}cs
using System;
using System.Net.Http;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Text;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using IgniteUI.Blazor.Controls; // for registering Ignite UI modulesnamespaceInfragistics.Samples
{
publicclassProgram
{
publicstaticasync Task Main(string[] args)
{
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("app");
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(IgbDataChartCategoryTrendLineModule)
);
await builder.Build().RunAsync();
}
}
}cs
@using IgniteUI.Blazor.Controls@using IgniteUI.Blazor.Controls@using System<style>/*
CSS styles are loaded from the shared CSS file located at:
https://static.infragistics.com/xplatform/css/samples/
*/#aboveContentSplit {
display: flex;
flex-direction: row;
}
#aboveContentLeftContainer {
margin-left: 1.25rem;
display: flex;
flex-grow: 1;
justify-content: start;
align-items: end;
}
#aboveContentRightContainer {
margin-right: 1.25rem;
display: flex;
flex-grow: 1;
justify-content: end;
align-items: end;
}
</style><divclass="container vertical"><divid="aboveContentSplit"><divid="aboveContentLeftContainer"><IgbToolbarName="toolbar"
@ref="toolbar"Orientation="ToolbarOrientation.Horizontal"OnCommand="ToolbarToggleAnnotations"><IgbToolActionIconMenuName="MenuForSubPanelTool"
@ref="menuForSubPanelTool"IconCollectionName="ChartToolbarIcons"IconName="analyze"><IgbToolActionGroupHeaderName="SubPanelGroup"
@ref="subPanelGroup"CloseOnExecute="true"Title="Visualizations"Subtitle="Layers"></IgbToolActionGroupHeader><IgbToolActionSubPanelName="CustomSubPanelTools"
@ref="customSubPanelTools"><IgbToolActionCheckboxName="EnableTooltipsLabel"
@ref="enableTooltipsLabel"Title="Enable Tooltips"CommandId="EnableTooltips"></IgbToolActionCheckbox><IgbToolActionCheckboxName="EnableCrosshairsLabel"
@ref="enableCrosshairsLabel"Title="Enable Crosshairs"CommandId="EnableCrosshairs"></IgbToolActionCheckbox><IgbToolActionCheckboxName="EnableFinalValuesLabel"
@ref="enableFinalValuesLabel"Title="Enable Final Values"CommandId="EnableFinalValues"></IgbToolActionCheckbox></IgbToolActionSubPanel></IgbToolActionIconMenu><IgbToolActionLabelName="zoomResetLabel"
@ref="zoomResetLabel"Title="Reset"AfterId="ZoomOut"IconName="reset"IconCollectionName="ChartToolbarIcons"CommandId="ZoomReset"IsHighlighted="true"></IgbToolActionLabel><IgbToolActionLabelName="zoomResetHidden"
@ref="zoomResetHidden"OverlayId="ZoomReset"Visibility="Visibility.Collapsed"></IgbToolActionLabel><IgbToolActionIconMenuName="AnalyzeMenu"
@ref="analyzeMenu"OverlayId="AnalyzeMenu"Visibility="Visibility.Collapsed"></IgbToolActionIconMenu><IgbToolActionLabelName="CopyMenu"
@ref="copyMenu"OverlayId="CopyMenu"Visibility="Visibility.Collapsed"></IgbToolActionLabel></IgbToolbar></div><divid="aboveContentRightContainer"><!-- insert aboveContentRight --><!-- end aboveContentRight --></div></div><divclass="container vertical fill"><IgbDataChartComputedPlotAreaMarginMode="ComputedPlotAreaMarginMode.Series"IsHorizontalZoomEnabled="true"IsVerticalZoomEnabled="true"Name="chart"
@ref="chart"><IgbCategoryXAxisName="xAxis"
@ref="xAxis"DataSource="CountryRenewableElectricity"Label="Year"></IgbCategoryXAxis><IgbNumericYAxisName="yAxis"
@ref="yAxis"Title="TWh"LabelLocation="AxisLabelsLocation.OutsideRight"></IgbNumericYAxis><IgbLineSeriesName="lineSeries1"
@ref="lineSeries1"Title="Electricity"XAxisName="xAxis"YAxisName="yAxis"DataSource="CountryRenewableElectricity"ValueMemberPath="America"></IgbLineSeries><IgbLineSeriesName="LineSeries2"
@ref="lineSeries2"Title="Electricity"XAxisName="xAxis"YAxisName="yAxis"DataSource="CountryRenewableElectricity"ValueMemberPath="Europe"></IgbLineSeries><IgbLineSeriesName="LineSeries3"
@ref="lineSeries3"Title="Electricity"XAxisName="xAxis"YAxisName="yAxis"DataSource="CountryRenewableElectricity"ValueMemberPath="China"></IgbLineSeries></IgbDataChart></div></div>@code {private Action BindElements { get; set; }
protectedoverrideasync Task OnAfterRenderAsync(bool firstRender)
{
var toolbar = this.toolbar;
var menuForSubPanelTool = this.menuForSubPanelTool;
var subPanelGroup = this.subPanelGroup;
var customSubPanelTools = this.customSubPanelTools;
var enableTooltipsLabel = this.enableTooltipsLabel;
var enableCrosshairsLabel = this.enableCrosshairsLabel;
var enableFinalValuesLabel = this.enableFinalValuesLabel;
var zoomResetLabel = this.zoomResetLabel;
var zoomResetHidden = this.zoomResetHidden;
var analyzeMenu = this.analyzeMenu;
var copyMenu = this.copyMenu;
var chart = this.chart;
var xAxis = this.xAxis;
var yAxis = this.yAxis;
var lineSeries1 = this.lineSeries1;
var lineSeries2 = this.lineSeries2;
var lineSeries3 = this.lineSeries3;
this.BindElements = () => {
toolbar.Target = this.chart;
};
this.BindElements();
}
private IgbToolbar toolbar;
private IgbToolActionIconMenu menuForSubPanelTool;
private IgbToolActionGroupHeader subPanelGroup;
private IgbToolActionSubPanel customSubPanelTools;
private IgbToolActionCheckbox enableTooltipsLabel;
private IgbToolActionCheckbox enableCrosshairsLabel;
private IgbToolActionCheckbox enableFinalValuesLabel;
private IgbToolActionLabel zoomResetLabel;
private IgbToolActionLabel zoomResetHidden;
private IgbToolActionIconMenu analyzeMenu;
private IgbToolActionLabel copyMenu;
private IgbDataChart chart;
private IgbCategoryXAxis xAxis;
private IgbNumericYAxis yAxis;
private IgbLineSeries lineSeries1;
private IgbLineSeries lineSeries2;
private IgbLineSeries lineSeries3;
publicvoidToolbarToggleAnnotations(IgbToolCommandEventArgs args)
{
var target = this.chart;
switch (args.Command.CommandId)
{
case"EnableTooltips":
IgbSeries annotationSeries = null;
foreach (var s in target.Series)
{
if (s is IgbDataToolTipLayer)
{
annotationSeries = s;
}
}
if (annotationSeries == null) {
target.Series.Add(new IgbDataToolTipLayer());
} else {
target.Series.Remove(annotationSeries);
}
break;
case"EnableCrosshairs":
IgbSeries crosshairSeries = null;
foreach (var s in target.Series)
{
if (s is IgbCrosshairLayer)
{
crosshairSeries = s;
}
}
if (crosshairSeries == null)
{
target.Series.Add(new IgbCrosshairLayer());
}
else
{
target.Series.Remove(crosshairSeries);
}
break;
case"EnableFinalValues":
IgbSeries finalValuesSeries = null;
foreach (var s in target.Series)
{
if (s is IgbFinalValueLayer)
{
finalValuesSeries = s;
}
}
if (finalValuesSeries == null)
{
target.Series.Add(new IgbFinalValueLayer());
}
else
{
target.Series.Remove(finalValuesSeries);
}
break;
}
}
private CountryRenewableElectricity _countryRenewableElectricity = null;
public CountryRenewableElectricity CountryRenewableElectricity
{
get
{
if (_countryRenewableElectricity == null)
{
_countryRenewableElectricity = new CountryRenewableElectricity();
}
return _countryRenewableElectricity;
}
}
}razor
도구를 수동으로 추가할 때 이 RenderIconFromText 방법을 사용하여 아이콘을 할당할 수 있습니다. 이 메서드에는 세 가지 매개 변수가 있습니다. 첫 번째는 도구에 정의된 아이콘 컬렉션 이름입니다. IconCollectionName 두 번째는 도구에 정의된 아이콘의 이름(예: IconName SVG 문자열 추가)입니다.
Data URL Icons
svg를 추가하는 것과 마찬가지로 URL RegisterIconFromDataURL에서 아이콘 이미지를 추가할 수도 있습니다. 메서드의 세 번째 매개 변수는 문자열 URL을 입력하는 데 사용됩니다.
using System;
using System.Collections.Generic;
publicclassCountryRenewableElectricityItem
{
publicstring Year { get; set; }
publicdouble Europe { get; set; }
publicdouble China { get; set; }
publicdouble America { get; set; }
}
publicclassCountryRenewableElectricity
: List<CountryRenewableElectricityItem>
{
publicCountryRenewableElectricity()
{
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2009",
Europe = 34,
China = 21,
America = 19
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2010",
Europe = 43,
China = 26,
America = 24
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2011",
Europe = 66,
China = 29,
America = 28
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2012",
Europe = 69,
China = 32,
America = 26
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2013",
Europe = 58,
China = 47,
America = 38
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2014",
Europe = 40,
China = 46,
America = 31
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2015",
Europe = 78,
China = 50,
America = 19
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2016",
Europe = 13,
China = 90,
America = 52
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2017",
Europe = 78,
China = 132,
America = 50
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2018",
Europe = 40,
China = 134,
America = 34
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2018",
Europe = 40,
China = 134,
America = 34
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2019",
Europe = 80,
China = 96,
America = 38
});
}
}cs
using System;
using System.Net.Http;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Text;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using IgniteUI.Blazor.Controls; // for registering Ignite UI modulesnamespaceInfragistics.Samples
{
publicclassProgram
{
publicstaticasync Task Main(string[] args)
{
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("app");
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(IgbAnnotationLayerProxyModule),
typeof(IgbDataChartCategoryTrendLineModule)
);
await builder.Build().RunAsync();
}
}
}cs
다음 예제에서는 색 편집기 도구를 사용하여 Blazor 데이터 차트 시리즈 브러시의 스타일을 지정하는 방법을 보여 줍니다.
EXAMPLE
DATA
MODULES
RAZOR
CSS
using System;
using System.Collections.Generic;
publicclassCountryRenewableElectricityItem
{
publicstring Year { get; set; }
publicdouble Europe { get; set; }
publicdouble China { get; set; }
publicdouble America { get; set; }
}
publicclassCountryRenewableElectricity
: List<CountryRenewableElectricityItem>
{
publicCountryRenewableElectricity()
{
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2009",
Europe = 34,
China = 21,
America = 19
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2010",
Europe = 43,
China = 26,
America = 24
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2011",
Europe = 66,
China = 29,
America = 28
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2012",
Europe = 69,
China = 32,
America = 26
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2013",
Europe = 58,
China = 47,
America = 38
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2014",
Europe = 40,
China = 46,
America = 31
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2015",
Europe = 78,
China = 50,
America = 19
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2016",
Europe = 13,
China = 90,
America = 52
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2017",
Europe = 78,
China = 132,
America = 50
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2018",
Europe = 40,
China = 134,
America = 34
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2018",
Europe = 40,
China = 134,
America = 34
});
this.Add(new CountryRenewableElectricityItem()
{
Year = @"2019",
Europe = 80,
China = 96,
America = 38
});
}
}cs
using System;
using System.Net.Http;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Text;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using IgniteUI.Blazor.Controls; // for registering Ignite UI modulesnamespaceInfragistics.Samples
{
publicclassProgram
{
publicstaticasync Task Main(string[] args)
{
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("app");
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
// registering Ignite UI modules
builder.Services.AddIgniteUIBlazor(
typeof(IgbToolbarModule),
typeof(IgbToolActionComboModule),
typeof(IgbToolActionColorEditorModule),
typeof(IgbDataChartToolbarModule),
typeof(IgbDataLegendModule),
typeof(IgbNumberAbbreviatorModule),
typeof(IgbDataChartCategoryModule),
typeof(IgbDataChartCoreModule),
typeof(IgbDataChartCategoryModule),
typeof(IgbDataChartAnnotationModule),
typeof(IgbDataChartInteractivityModule),
typeof(IgbDataChartAnnotationModule)
);
await builder.Build().RunAsync();
}
}
}cs
@using IgniteUI.Blazor.Controls@using IgniteUI.Blazor.Controls@using System<style>/*
CSS styles are loaded from the shared CSS file located at:
https://static.infragistics.com/xplatform/css/samples/
*/#aboveContentSplit {
display: flex;
flex-direction: row;
}
#aboveContentLeftContainer {
margin-left: 1.25rem;
display: flex;
flex-grow: 1;
justify-content: start;
align-items: end;
}
#aboveContentRightContainer {
margin-right: 1.25rem;
display: flex;
flex-grow: 1;
justify-content: end;
align-items: end;
}
</style><divclass="container vertical"><divid="aboveContentSplit"><divid="aboveContentLeftContainer"><IgbToolbarName="toolbar"
@ref="toolbar"OnCommand="ColorEditorToggleSeriesBrush"><IgbToolActionColorEditorTitle="Series Brush"Name="colorEditorTool"
@ref="colorEditorTool"CommandId="ToggleSeriesBrush"></IgbToolActionColorEditor></IgbToolbar></div><divid="aboveContentRightContainer"><!-- insert aboveContentRight --><!-- end aboveContentRight --></div></div><divclass="container vertical fill"><IgbDataChartIsHorizontalZoomEnabled="true"Name="chart"
@ref="chart"><IgbCategoryXAxisName="xAxis"
@ref="xAxis"DataSource="CountryRenewableElectricity"Label="Year"></IgbCategoryXAxis><IgbNumericYAxisName="yAxis"
@ref="yAxis"Title="TWh"LabelLocation="AxisLabelsLocation.OutsideRight"></IgbNumericYAxis><IgbLineSeriesName="lineSeries1"
@ref="lineSeries1"Title="Electricity"XAxisName="xAxis"YAxisName="yAxis"DataSource="CountryRenewableElectricity"ValueMemberPath="America"MarkerType="MarkerType.None"></IgbLineSeries></IgbDataChart></div></div>@code {private Action BindElements { get; set; }
protectedoverrideasync Task OnAfterRenderAsync(bool firstRender)
{
var toolbar = this.toolbar;
var colorEditorTool = this.colorEditorTool;
var chart = this.chart;
var xAxis = this.xAxis;
var yAxis = this.yAxis;
var lineSeries1 = this.lineSeries1;
this.BindElements = () => {
toolbar.Target = this.chart;
};
this.BindElements();
}
private IgbToolbar toolbar;
private IgbToolActionColorEditor colorEditorTool;
private IgbDataChart chart;
private IgbCategoryXAxis xAxis;
private IgbNumericYAxis yAxis;
private IgbLineSeries lineSeries1;
publicvoidColorEditorToggleSeriesBrush(IgbToolCommandEventArgs args)
{
var target = this.chart;
var color = args.Command.ArgumentsList[0].Value;
switch (args.Command.CommandId)
{
case"ToggleSeriesBrush":
IgbSeries series = target.ContentSeries[0];
series.Brush = color.ToString();
break;
}
}
private CountryRenewableElectricity _countryRenewableElectricity = null;
public CountryRenewableElectricity CountryRenewableElectricity
{
get
{
if (_countryRenewableElectricity == null)
{
_countryRenewableElectricity = new CountryRenewableElectricity();
}
return _countryRenewableElectricity;
}
}
}razor