|
423 | 423 | </g> |
424 | 424 | </g> |
425 | 425 |
|
| 426 | + <!-- HIGHLIGHT AREA --> |
| 427 | + <g v-if="hasHighlightArea"> |
| 428 | + <rect |
| 429 | + data-cy="xy-highlight-area" |
| 430 | + :x="drawingArea.left + (drawingArea.width / maxSeries) * (chartConfig.chart.highlightArea.from - (slicer.start))" |
| 431 | + :y="drawingArea.top" |
| 432 | + :height="drawingArea.height" |
| 433 | + :width="(drawingArea.width / maxSeries) * highlightAreaSpan" |
| 434 | + :fill="`${chartConfig.chart.highlightArea.color}${opacity[chartConfig.chart.highlightArea.opacity]}`" |
| 435 | + /> |
| 436 | + <foreignObject v-if="chartConfig.chart.highlightArea.caption.text" |
| 437 | + :x="(drawingArea.left + (drawingArea.width / maxSeries) * (chartConfig.chart.highlightArea.from - (slicer.start))) - (chartConfig.chart.highlightArea.caption.width === 'auto' ? 0 : chartConfig.chart.highlightArea.caption.width / 2 - (drawingArea.width / maxSeries) * highlightAreaSpan / 2)" |
| 438 | + :y="drawingArea.top + chartConfig.chart.highlightArea.caption.offsetY" |
| 439 | + style="overflow:visible" |
| 440 | + :width="chartConfig.chart.highlightArea.caption.width === 'auto' ? (drawingArea.width / maxSeries) * highlightAreaSpan : chartConfig.chart.highlightArea.caption.width" |
| 441 | + |
| 442 | + > |
| 443 | + <div :style="`padding:${chartConfig.chart.highlightArea.caption.padding}px;text-align:${chartConfig.chart.highlightArea.caption.textAlign};font-size:${chartConfig.chart.highlightArea.caption.fontSize}px;color:${chartConfig.chart.highlightArea.caption.color};font-weight:${chartConfig.chart.highlightArea.caption.bold ? 'bold' : 'normal'}`"> |
| 444 | + {{ chartConfig.chart.highlightArea.caption.text }} |
| 445 | + </div> |
| 446 | + </foreignObject> |
| 447 | + </g> |
| 448 | + |
| 449 | + <!-- LEFT & RIGHT PADDING COVERS --> |
| 450 | + <g> |
| 451 | + <rect |
| 452 | + :x="0" |
| 453 | + :y="drawingArea.top" |
| 454 | + :width="drawingArea.left - 1" |
| 455 | + :height="drawingArea.height" |
| 456 | + :fill="chartConfig.chart.backgroundColor" |
| 457 | + /> |
| 458 | + <rect |
| 459 | + :x="drawingArea.right + 1" |
| 460 | + :y="drawingArea.top" |
| 461 | + :width="chartConfig.chart.width - drawingArea.left - 1" |
| 462 | + :height="drawingArea.height" |
| 463 | + :fill="chartConfig.chart.backgroundColor" |
| 464 | + /> |
| 465 | + </g> |
| 466 | + |
426 | 467 | <!-- Y LABELS --> |
427 | 468 | <g v-if="chartConfig.chart.grid.labels.show"> |
428 | 469 | <g v-for="(yLabel, i) in yLabels" :key="`yLabel_${i}`"> |
|
528 | 569 | </g> |
529 | 570 | </g> |
530 | 571 |
|
531 | | - <!-- HIGHLITGHT AREA --> |
532 | | - <g v-if="hasHighlightArea"> |
533 | | - <rect |
534 | | - data-cy="xy-highlight-area" |
535 | | - :x="drawingArea.left + (drawingArea.width / maxSeries) * (chartConfig.chart.highlightArea.from - (slicer.start))" |
536 | | - :y="drawingArea.top" |
537 | | - :height="drawingArea.height" |
538 | | - :width="(drawingArea.width / maxSeries) * highlightAreaSpan" |
539 | | - :fill="`${chartConfig.chart.highlightArea.color}${opacity[chartConfig.chart.highlightArea.opacity]}`" |
540 | | - /> |
541 | | - <foreignObject v-if="chartConfig.chart.highlightArea.caption.text" |
542 | | - :x="(drawingArea.left + (drawingArea.width / maxSeries) * (chartConfig.chart.highlightArea.from - (slicer.start))) - (chartConfig.chart.highlightArea.caption.width === 'auto' ? 0 : chartConfig.chart.highlightArea.caption.width / 2 - (drawingArea.width / maxSeries) * highlightAreaSpan / 2)" |
543 | | - :y="drawingArea.top + chartConfig.chart.highlightArea.caption.offsetY" |
544 | | - style="overflow:visible" |
545 | | - :width="chartConfig.chart.highlightArea.caption.width === 'auto' ? (drawingArea.width / maxSeries) * highlightAreaSpan : chartConfig.chart.highlightArea.caption.width" |
546 | | - |
547 | | - > |
548 | | - <div :style="`padding:${chartConfig.chart.highlightArea.caption.padding}px;text-align:${chartConfig.chart.highlightArea.caption.textAlign};font-size:${chartConfig.chart.highlightArea.caption.fontSize}px;color:${chartConfig.chart.highlightArea.caption.color};font-weight:${chartConfig.chart.highlightArea.caption.bold ? 'bold' : 'normal'}`"> |
549 | | - {{ chartConfig.chart.highlightArea.caption.text }} |
550 | | - </div> |
551 | | - </foreignObject> |
552 | | - </g> |
553 | | - |
554 | 572 | <!-- TOOLTIP TRAPS --> |
555 | 573 | <g v-if="chartConfig.chart.tooltip.show"> |
556 | 574 | <g v-for="(trap, i) in maxSeries" :key="`tooltip_trap_${i}`"> |
|
0 commit comments