Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

AxisSection when deleting a section (dataLabel = true), the label on the axis remains #1171

Open
Yura-alt opened this issue Nov 6, 2022 · 0 comments

Comments

@Yura-alt
Copy link

Yura-alt commented Nov 6, 2022

I'm trying to figure out why I still have a label when deleting a section. I tried updating the schedule, but the problem remains.

public int AddSection(double fValueCrurrent, Brush stroke)
{
AxisSection newSection = new AxisSection();
newSection.Value = fValueCrurrent;
newSection.Stroke = stroke;
newSection.StrokeThickness = 1;
newSection.DisableAnimations = true;
newSection.DataLabel = true;
newSection.DataLabelForeground = Brushes.White;
int resIndex = CVM.Axissection.Count();
CVM.Axissection.Add(newSection);
CVM.ChartVM.Update();
return resIndex;
}

public void RemoveSection(int i)
{
if (i >= CVM.Axissection.Count)
return;
CVM.Axissection.RemoveAt(i);
CVM.ChartVM.Update();
}

Add Sections Remove sections
![pict1](https://user-images.githubusercontent.com/77338213/200179773-8d3e70d8-9c01-4461-9c3f-de5abeec3573.PNG) ![pict2](https://user-images.githubusercontent.com/77338213/200179847-e152dff0-df26-4049-92fa-37d6ae0cf948.PNG)
Live-Charts version 0.9.7
.Net Version NET 4.0
Windows Windows 10 x64
@Yura-alt Yura-alt changed the title Axisaction when deleting a section (dataLabel = true), the label on the axis remains AxisSection when deleting a section (dataLabel = true), the label on the axis remains Nov 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant