Skip to content

Candles width not adjusting properly (candles overlap) in Candlesticksseries #1449

Answered by TomDeFord
BigCodXr asked this question in Q&A
Discussion options

You must be logged in to vote

I came across the same issue. The ColumnSeries inherits from BarSeries which has a padding property; unfortunately the CandleSticks don't have one. The code below is the smallest I could make my solution. If you want to add a property to the series class to nicely define the margin amount (on a per instance basis) it requires overriding of several LiveCharts classes.

I prefer the margin as a percentage of the width but the fixed width margin is there too.

Enjoy.

using LiveChartsCore.Drawing;
using SkiaSharp;

namespace LiveChartsCore.SkiaSharpView.Drawing.Geometries;

public class CandlestickGeometryHack : CandlestickGeometry, IFinancialGeometry<SkiaSharpDrawingContext>
{
    public override

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by BigCodXr
Comment options

You must be logged in to vote
2 replies
@BigCodXr
Comment options

@TomDeFord
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants