GrapeCity.Xaml.SpreadSheet.Data Namespace > SpreadDataSeries Class : InvertIfNegative Property |
'Declaration Public Property InvertIfNegative As Boolean
'Usage Dim instance As SpreadDataSeries Dim value As Boolean instance.InvertIfNegative = value value = instance.InvertIfNegative
public bool InvertIfNegative {get; set;}
true
to display an alternative color if the value is negative; otherwise, false
.GrapeCity.Xaml.SpreadSheet.Data.SpreadChart chart = new GrapeCity.Xaml.SpreadSheet.Data.SpreadChart("Chart", GrapeCity.Xaml.SpreadSheet.Data.SpreadChartType.ColumnStacked, 0, 0, 200, 200); GrapeCity.Xaml.SpreadSheet.Data.SpreadDataSeries ds = new GrapeCity.Xaml.SpreadSheet.Data.SpreadDataSeries(); ds.Values.Add(4); ds.Values.Add(-7); ds.Values.Add(-6); ds.Values.Add(10); ds.Values.Add(4); ds.Fill = new SolidColorBrush(Windows.UI.Colors.Green); ds.Stroke = new SolidColorBrush(Windows.UI.Colors.Blue); ds.StrokeDashType = GrapeCity.Xaml.SpreadSheet.Data.StrokeDashType.Dot; ds.StrokeThickness = 2; ds.InvertIfNegative = true; ds.NegativeFill = new SolidColorBrush(Windows.UI.Colors.Red); chart.DataSeries.Add(ds); gcSpreadSheet1.ActiveSheet.Charts.Add(chart);
Dim chart As New GrapeCity.Xaml.SpreadSheet.Data.SpreadChart("Chart", GrapeCity.Xaml.SpreadSheet.Data.SpreadChartType.ColumnStacked, 0, 0, 200, 200) Dim ds As New GrapeCity.Xaml.SpreadSheet.Data.SpreadDataSeries() ds.Values.Add(4) ds.Values.Add(-7) ds.Values.Add(-6) ds.Values.Add(10) ds.Values.Add(4) ds.Fill = New SolidColorBrush(Windows.UI.Colors.Green) ds.Stroke = New SolidColorBrush(Windows.UI.Colors.Blue) ds.StrokeDashType = GrapeCity.Xaml.SpreadSheet.Data.StrokeDashType.Dot ds.StrokeThickness = 2 ds.InvertIfNegative = True ds.NegativeFill = New SolidColorBrush(Windows.UI.Colors.Red) chart.DataSeries.Add(ds) GcSpreadSheet1.ActiveSheet.Charts.Add(chart)
Target Platforms: Windows Server 2012, Windows RT