docs/cartesianChart/columnseries.md
{{ render "~/shared/series.md" }}
{{ render "~/shared/datalabels.md" }}
If the stroke property is not set, then LiveCharts will create it based on the series position in your series collection and the current theme.
Series = new ISeries[]
{
new ColumnSeries<int>
{
Values = new [] { 4, 4, 7, 2, 8 },
Stroke = new SolidColorPaint(SKColors.Blue) { StrokeThickness = 4 }, // mark
Fill = null,
},
new ColumnSeries<int>
{
Values = new [] { 7, 5, 3, 2, 6 },
Stroke = new SolidColorPaint(SKColors.Red) { StrokeThickness = 8 }, // mark
Fill = null,
}
};
:::info
Paints can create gradients, dashed lines and more, if you need help using the Paint instances take
a look at the [Paints article]({{ website_url }}/docs/{{ platform }}/{{ version }}/Overview.Paints).
:::
If the fill property is not set, then LiveCharts will create it based on the series position in your series collection and the current theme.
Series = new ISeries[]
{
new ColumnSeries<int>
{
Values = new [] { 4, 4, 7, 2, 8 },
Fill = new SolidColorPaint(SKColors.Blue), // mark
Stroke = null
},
new ColumnSeries<int>
{
Values = new [] { 7, 5, 3, 2, 6 },
Fill = new SolidColorPaint(SKColors.Red), // mark
Stroke = null
}
};
:::info
Paints can create gradients, dashed lines and more, if you need help using the Paint instances take
a look at the [Paints article]({{ website_url }}/docs/{{ platform }}/{{ version }}/Overview.Paints).
:::
These properties define the corners radius in the rectangle geometry.
Series = new ISeries[]
{
new ColumnSeries<int>
{
Values = new [] { 4, 4, 7, 2, 8 },
Rx = 50, // mark
Ry = 50 // mark
}
};
Specifies the maximum width a column can take, take a look at the following sample, where the max width is 10.
Series = new ISeries[]
{
new ColumnSeries<int>
{
Values = new [] { 4, 4, 7, 2, 8 },
MaxBarWidth = 10 // mark
}
};
But now lets use double.MaxValue to see the difference.
Series = new ISeries[]
{
new ColumnSeries<int>
{
Values = new [] { 4, 4, 7, 2, 8 },
MaxBarWidth = double.MaxValue // mark
}
};
Finally we could also set the padding to 0.
Series = new ISeries[]
{
new ColumnSeries<int>
{
Values = new [] { 4, 4, 7, 2, 8 },
MaxBarWidth = double.MaxValue,
Padding = 0 // mark
}
};
Gets or sets the padding for each bar in the series.
Series = new ISeries[]
{
new ColumnSeries<int>
{
Values = new [] { 4, 4, 7, 2, 8 },
Padding = 5 // mark
},
new ColumnSeries<int>
{
Values = new [] { 2, 3,1, 4, 6 },
Padding = 5 // mark
}
};
The ignores bar position property let the series ignore all the other bar series in the same coordinate, this is useful to create backgrounds for columns, take a look at the following sample:
Series = new ISeries[]
{
new ColumnSeries<double>
{
Values = new ObservableCollection<double> { 10, 10, 10, 10, 10, 10, 10 },
Stroke = null,
Fill = new SolidColorPaint(new SKColor(30, 30, 30, 30)),
IgnoresBarPosition = true // mark
},
new ColumnSeries<double>
{
Values = new ObservableCollection<double> { 3, 10, 5, 3, 7, 3, 8 },
Stroke = null,
Fill = new SolidColorPaint(SKColors.CornflowerBlue),
IgnoresBarPosition = true // mark
}
};
{{ render "~/shared/series2.md" }}