Hello everyone, for now I need create a bar chart like the image I have attached in a short time and I believe telerik will be the best solution for it. But unfortunately, after take a look in the document and try to implement a sample , I still cannot make it work , here is my code and I still have no idea what's wrong with them . Please help , thank you so much :)
The problems are:
1/Cannot change the fill color of the bar
2/ Cannot add the the vertical line behind for each chart column
3/I wonder If we can make the chart columt half-round like the design ? (It means that round in the head of column and flat in the tail)
4/Gradient color for chart column
var chart = new RadCartesianChartView(this);
var customPalette = new ChartPalette(chart.Palette);
var barEntry = customPalette.GetEntry(ChartPalette.BarFamily);
barEntry.Fill = Color.Rgb(68, 163, 122);
barEntry.AdditionalFill = Color.Rgb(118, 195, 169);
barEntry.Stroke = 0;
chart.Palette = customPalette;
var verticalAxis = new LinearAxis();
var horizontalAxis = new CategoricalAxis
{
LabelFormat = "%.0f"
};
var barSeries = new BarSeries
{
ValueBinding = new ValueBinding(),
CategoryBinding = new CategoryBinding(),
VerticalAxis = verticalAxis,
HorizontalAxis = horizontalAxis,
MaxBarWidth = 10,
AreBarsRounded = true,
RoundBarsRadius = 5,
Data = getData()
};
var grid = new CartesianChartGrid();
grid.MajorXLinesRenderMode = GridLineRenderMode.All;
grid.LineThickness = 5;
grid.LineColor = Color.Red;
grid.MajorLinesVisibility = GridLineVisibility.X;
chart.Grid = grid;
chart.Grid.CanApplyPalette = true;
chart.Series.Add(barSeries);
barSeries.UpdatePalette(true);