Support timeline

This commit is contained in:
Vijay Karthik 2025-02-18 15:39:44 -08:00
parent 406d35c6a6
commit a1f58d4315
9 changed files with 246 additions and 22 deletions

View file

@ -113,7 +113,11 @@ func (m *markPointPainter) Render() (Box, error) {
value = markPointData.CustomYVal
}
painter.Pin(p.X, p.Y-symbolSize>>1, symbolSize)
pinY := p.Y
if p.Y < symbolSize {
pinY = symbolSize
}
painter.Pin(p.X, pinY-symbolSize>>1, symbolSize)
text := commafWithDigits(value)
textBox := painter.MeasureText(text)
if textBox.Width() > symbolSize {