* Extract series name from c:tx element.
(txNode: SafeXmlNode)
| 259 | * Extract series name from c:tx element. |
| 260 | */ |
| 261 | function extractSeriesName(txNode: SafeXmlNode): string { |
| 262 | // Try strRef > strCache > pt > v |
| 263 | const strRef = txNode.child('strRef') |
| 264 | if (strRef.exists()) { |
| 265 | const strCache = strRef.child('strCache') |
| 266 | const pts = strCache.children('pt') |
| 267 | if (pts.length > 0) { |
| 268 | return pts[0].child('v').text() |
| 269 | } |
| 270 | } |
| 271 | // Try direct v element |
| 272 | const v = txNode.child('v') |
| 273 | if (v.exists()) return v.text() |
| 274 | return '' |
| 275 | } |
| 276 | |
| 277 | /** |
| 278 | * Resolve a color from a fill node (solidFill) to a hex string. |
no test coverage detected