How hide labels?
See original GitHub issueHello. I want to use LiveChart 2 in Avalonia project. I set IsVisible = false
in XAxis and YAxis to hide labels, but now there is empty space. How can i hide it?
Thanks.
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
How to hide <label for=""> CSS
Hiding the label with display: none; is bad for web accesibility and you shouldn't do it. Try visibility: hidden; instead.
Read more >HTML label hidden Attribute
The hidden attribute hides the <label> element. You can specify either 'hidden' (without value) or 'hidden="hidden"'. Both are valid. A hidden <label> ...
Read more >How can I hide taskbar labels in Windows 10 without ...
Under taskbar settings, choose "Always, hide labels". Use one of the following options to disable taskbar combining: option1: edit the registry.
Read more >Hide taskbar labels - Windows 10
Right click a blank area on the taskbar and choose Taskbar Settings. Under Combine Taskbar Buttons, choose Always, hide labels. Exit Settings.
Read more >How to Hide Field Labels on Your Form
Hiding Specific Field Labels · In the Form Builder, select the element's gear icon to open properties. · In the properties pane on...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
the empty space is not caused by the axis, it is caused by the series, notice all the series have a blank distance between the start of the axis and the first point of the series.
Series.DataPadding
should do the trick, docs are not ready yet, but you can try something like:for both
X
andY
axes:0
means nothing,1
means theAxis tick
, anAxis tick
is the distance between the labels in the axis (even if there are not visible labels, the tick is calculated).I have also seen this issue, I am not sure yet, but I think this is an Avalonia issue.
The problem is when the chart clears the canvas with a transparent color, Avalonia has not drawn anything behind our chart control, then we get this result.
The workaround I built for the library, is that based on the Background color of the chart I pull a color to clear the canvas:
This is the workaround, and it is not working in your case because it was not able to build a color from
null
, just set a color for now, or open an issue in Avalonia, I am not completely sure yet, but I am almost sure that the issue is theirs. https://github.com/beto-rodriguez/LiveCharts2/blob/master/src/skiasharp/LiveChartsCore.SkiaSharp.Avalonia/CartesianChart.axaml.cs#L325