Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataLabel do not display #1145

Closed
lindadamama opened this issue Jul 31, 2023 · 9 comments
Closed

DataLabel do not display #1145

lindadamama opened this issue Jul 31, 2023 · 9 comments

Comments

@lindadamama
Copy link

lindadamama commented Jul 31, 2023

Describe the bug
A clear and concise description of what the bug is.
123123

123

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@beto-rodriguez
Copy link
Owner

I think they are there, they are just outside of the bounds of the chart, try to set the alignment to bottom, or use the DataPadding property in your series to set a greater "data padding"

@lindadamama
Copy link
Author

I try to increase the size of Datapadding, but the effect is not obvious
123123123

@beto-rodriguez
Copy link
Owner

The thing here is that labels must be outside of the chart bounds, why don't you just place the labels at bottom in your top series?

@lindadamama
Copy link
Author

Because that will lead to inconsistent display styles, and the top line is not always on top

@beto-rodriguez
Copy link
Owner

beto-rodriguez commented Aug 15, 2023

the chart also has the DrawMargin property, it allows you to set a margin to the area where series are drawn.

@lindadamama
Copy link
Author

image
Setting the margin seems to have no effect.

@beto-rodriguez
Copy link
Owner

Thanks for the feedback, it seems that the labels paint set a Clip to the draw margin, we need a way to change that, that is currently not supported.

@beto-rodriguez
Copy link
Owner

In beta.920 we can now customize the labels clip rectangle; in your case you can try:

new LineSeries<double>
{
    Values = new double[] { 2, 1, 3, 5, 3, 4, 6 },
    Fill = null,
    ClippingMode = LiveChartsCore.Measure.ClipMode.X, // None would also work 
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants