El componente Blazor barra de herramientas es un contenedor complementario para las operaciones de la interfaz de usuario que se usará principalmente con nuestros componentes de gráficos. La barra de herramientas se actualizará dinámicamente con un ajuste preestablecido de propiedades y elementos de herramienta cuando se vincule a nuestros IgbDataChart componentes o IgbCategoryChart. Podrá crear herramientas personalizadas para su proyecto, lo que permitirá a los usuarios finales proporcionar cambios, ofreciendo una cantidad infinita de personalización.
Ejemplo de barra de herramientas 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(IgbLegendModule),
typeof(IgbToolbarModule),
typeof(IgbCategoryChartModule),
typeof(IgbCategoryChartToolbarModule)
);
await builder.Build().RunAsync();
}
}
}cs
¿Te gusta esta muestra? Obtenga acceso a nuestro kit de herramientas de Ignite UI for Blazor completo y comience a crear sus propias aplicaciones en minutos. Descárgalo gratis.
最速のデータ グリッド、高性能なチャート、すぐに使用できる機能のフルセットなどを含む 60 以上の再利用可能なコンポーネント を使用して、最新の Web エクスペリエンスを構築します。
También deberá vincular un archivo CSS adicional para aplicar el estilo al IgbToolbar componente. Lo siguiente debe colocarse en el archivo wwwroot/index.html de un proyecto de Blazor Web Assembly o en el archivo Pages/_Host.cshtml de un proyecto de Blazor Server:
Cada una de estas herramientas expone un evento OnCommand que se activa al hacer clic con el mouse.
Las herramientas nuevas y existentes se pueden reposicionar y marcar como ocultas usando las propiedades OverlayId, BeforeId y AfterId en el objeto IgbToolAction. ToolActions también expone una propiedad Visibility.
El siguiente ejemplo demuestra cómo ocultar las acciones de las herramientas de menú integradas ZoomReset y AnalyzeMenu. Se agrega una nueva instancia de la acción de la herramienta ZoomReset y se coloca dentro de ZoomMenu usando la propiedad AfterId y asignándola a ZoomOut. Esto asegurará que la nueva herramienta Restablecer se muestre en la parte inferior del ZoomMenu.
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="ToolbarToggleTooltip"><IgbToolActionCheckboxName="EnableTooltipsLabel"
@ref="enableTooltipsLabel"Title="Enable Tooltips"BeforeId="ZoomReset"CommandId="EnableTooltips"></IgbToolActionCheckbox><IgbToolActionLabelName="zoomResetHidden"
@ref="zoomResetHidden"OverlayId="ZoomReset"Visibility="Visibility.Collapsed"></IgbToolActionLabel><IgbToolActionLabelName="zoomResetLabel"
@ref="zoomResetLabel"Title="Reset"AfterId="ZoomOut"IconName="reset"IconCollectionName="ChartToolbarIcons"CommandId="ZoomReset"></IgbToolActionLabel><IgbToolActionIconMenuName="AnalyzeMenu"
@ref="analyzeMenu"OverlayId="AnalyzeMenu"Visibility="Visibility.Collapsed"></IgbToolActionIconMenu></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 enableTooltipsLabel = this.enableTooltipsLabel;
var zoomResetHidden = this.zoomResetHidden;
var zoomResetLabel = this.zoomResetLabel;
var analyzeMenu = this.analyzeMenu;
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 IgbToolActionCheckbox enableTooltipsLabel;
private IgbToolActionLabel zoomResetHidden;
private IgbToolActionLabel zoomResetLabel;
private IgbToolActionIconMenu analyzeMenu;
private IgbDataChart chart;
private IgbCategoryXAxis xAxis;
private IgbNumericYAxis yAxis;
private IgbLineSeries lineSeries1;
private IgbLineSeries lineSeries2;
private IgbLineSeries lineSeries3;
publicvoidToolbarToggleTooltip(IgbToolCommandEventArgs args)
{
var target = this.chart;
switch (args.Command.CommandId)
{
case"EnableTooltips":
IgbSeries toRemove = null;
foreach (var s in target.Series)
{
if (s is IgbDataToolTipLayer)
{
toRemove = s;
}
}
if (toRemove == null) {
target.Series.Add(new IgbDataToolTipLayer());
} else {
target.Series.Remove(toRemove);
}
break;
}
}
private CountryRenewableElectricity _countryRenewableElectricity = null;
public CountryRenewableElectricity CountryRenewableElectricity
{
get
{
if (_countryRenewableElectricity == null)
{
_countryRenewableElectricity = new CountryRenewableElectricity();
}
return _countryRenewableElectricity;
}
}
}razor
La barra de herramientas Blazor contiene una Target propiedad. Esto se utiliza para vincular un componente, como se IgbDataChart muestra en el código a continuación:
Varios elementos y menús IgbToolAction preexistentes se vuelven disponibles cuando IgbDataChart se vincula con la barra de herramientas. Aquí hay una lista de las acciones de herramientas IgbDataChart integradas Blazor y su OverlayId asociado:
Acciones de zoom
ZoomReset: un IgbToolActionLabel que invoca el método ResetZoom en el gráfico para restablecer el nivel de zoom a su posición predeterminada.
SeriesAvg: una IgbToolActionCheckbox que agrega o elimina un IgbValueLayer a la colección de series del gráfico usando ValueLayerValueMode de tipo Average.
ValueLabelsMenu: Un submenú que contiene varias herramientas para mostrar diferentes anotaciones en el IgbDataChart área de la trama.
ValueLabelsHeader: encabezado de sección del submenú para las siguientes herramientas:
ShowGridlines: una IgbToolActionCheckbox que alterna líneas de cuadrícula adicionales aplicando un MajorStroke al eje X.
Acción Guardar en imagen
CopyAsImage: A IgbToolActionLabel que expone una opción para copiar el gráfico en el portapapeles.
CopyHeader: Un encabezado de subsección.
Iconos SVG
Al agregar herramientas manualmente, los iconos se pueden asignar mediante el RenderIconFromText método. Hay tres parámetros que se deben pasar en este método. El primero es el nombre de la colección de iconos definido en la herramienta, por ejemplo. IconCollectionName El segundo es el nombre del icono definido en la herramienta, por ejemplo IconName, seguido de la adición de la cadena SVG.
De forma predeterminada, la barra de herramientas Blazor se muestra horizontalmente, pero también tiene la capacidad de mostrarse verticalmente estableciendo la Orientation propiedad.
El siguiente ejemplo demuestra la orientación vertical de la barra de herramientas 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(IgbDataChartToolbarModule),
typeof(IgbDataChartCoreModule),
typeof(IgbDataChartCategoryModule),
typeof(IgbDataChartAnnotationModule),
typeof(IgbDataChartInteractivityModule),
typeof(IgbAnnotationLayerProxyModule),
typeof(IgbDataChartCategoryTrendLineModule)
);
await builder.Build().RunAsync();
}
}
}cs
/*
CSS styles are loaded from the shared CSS file located at:
https://static.infragistics.com/xplatform/css/samples/
*/css
Color Editor
Puede agregar una herramienta de editor de color personalizada a la barra de herramientas Blazor, que también funcionará con el evento Command para realizar un estilo personalizado en la aplicación.
En el ejemplo siguiente se muestra el estilo del pincel de la serie Blazor Gráfico de datos con la herramienta Editor de color.
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