* Extract text color from a txPr element: txPr > p > pPr > defRPr > solidFill.
(parentNode: SafeXmlNode, ctx: RenderContext)
| 454 | * Extract text color from a txPr element: txPr > p > pPr > defRPr > solidFill. |
| 455 | */ |
| 456 | function extractTxPrColor(parentNode: SafeXmlNode, ctx: RenderContext): string | undefined { |
| 457 | const txPr = parentNode.child('txPr') |
| 458 | if (!txPr.exists()) return undefined |
| 459 | for (const p of txPr.children('p')) { |
| 460 | const pPr = p.child('pPr') |
| 461 | if (!pPr.exists()) continue |
| 462 | const defRPr = pPr.child('defRPr') |
| 463 | if (!defRPr.exists()) continue |
| 464 | const fill = defRPr.child('solidFill') |
| 465 | if (fill.exists()) { |
| 466 | return resolveColorToHex(fill, ctx) |
| 467 | } |
| 468 | } |
| 469 | return undefined |
| 470 | } |
| 471 | |
| 472 | /** |
| 473 | * Parse c:dLbls (data labels) configuration from a chart type node or series. |
no test coverage detected