@nova-ui/charts 20.0.12 → 20.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/css/styles.css +1 -1
- package/fesm2022/nova-ui-charts.mjs +269 -14
- package/fesm2022/nova-ui-charts.mjs.map +1 -1
- package/index.d.ts +38 -3
- package/package.json +2 -2
- package/sdk/less/nui-charts.less +22 -0
package/bundles/css/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%;z-index:1000}.cdk-overlay-backdrop{position:absolute;inset:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0;touch-action:manipulation;z-index:1000;transition:opacity .4s cubic-bezier(.25,.8,.25,1)}@media(prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors:active){.cdk-overlay-backdrop-showing{opacity:.6}}.cdk-overlay-dark-backdrop{background:#00000052}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px;z-index:1000}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}.nui-chart{display:block;height:100%;width:100%}.nui-chart .hidden{display:none}.nui-chart svg{display:block}.nui-chart .sw-hidden{opacity:0;visibility:hidden}.nui-chart .tick-hidden-text text{opacity:0}.nui-chart .sw-line{fill:none;stroke-width:2px;shape-rendering:auto}.nui-chart .sw-interaction-layer .tooltip-group text{font-size:12px}.nui-chart .sw-interaction-layer .tooltip-group .nui-chart-highlight-tooltip-marker{stroke:#fff}.nui-chart .sw-interaction-layer .tooltip-group .nui-chart-highlight-tooltip-bg{fill:var(--nui-color-bg-mid_dark,#333)}.nui-chart .nui-chart-hidden{visibility:hidden}.nui-chart .brush .selection{fill:var(--nui-color-active,#0079aa);fill-opacity:.2}.nui-chart nui-chart-point-marker[color-index="2"] .nui-chart-point-marker,.nui-chart nui-chart-point-marker[color-index="8"] .nui-chart-point-marker,.nui-chart nui-chart-point-marker[color-index="14"] .nui-chart-point-marker{shape-rendering:crispEdges}.nui-chart .nui-chart-column-separator{stroke:#fff;stroke-width:1}.nui-chart .nui-chart-trend-line{stroke:var(--black,#111);stroke-width:1}.nui-chart .trend-line-arrow{fill:var(--black,#111)}.nui-chart .nui-chart-threshold-lines .nui-chart-threshold-error,.nui-chart .nui-chart-threshold-lines .nui-chart-threshold-warning{fill-opacity:1}.nui-chart .nui-chart-highlight-tooltip-text{font-weight:800}.nui-chart .nui-chart-point-marker-hidden{visibility:hidden}.nui-chart .nui-chart-percentile-line{stroke-width:2px;stroke-dasharray:5,5,2,5}.nui-chart .nui-chart-percentile-text{font-size:10px;font-weight:600}.nui-chart .nui-chart-annotation-line{stroke-width:1px;shape-rendering:crispEdges;pointer-events:none}.nui-chart .nui-chart-annotation-line--hover{stroke:var(--nui-color-text-link,#006791)}.nui-chart .nui-chart-annotation-note{fill:var(--nui-color-text-link,#006791);font-weight:600;mix-blend-mode:hue}.nui-chart .nui-chart-annotation-hover-rect{fill:transparent;cursor:pointer}.nui-chart .nui-chart-annotation-hover-rect--hidden{fill:transparent}.nui-chart .nui-chart-annotation-background-rect{fill:var(--white,#fff)}.nui-chart .nui-chart-annotation-hover-highlight{fill-opacity:.2}.nui-chart .nui-chart-annotation-hover-highlight--hidden{fill:transparent}.nui-chart .nui-chart-annotation-hover-marker{stroke:var(--nui-color-text-link,#006791);pointer-events:none}.nui-chart .nui-chart-other-series.tilebox .tilebox-value,.nui-chart .nui-chart-baseline-series.tilebox .tilebox-value,.nui-chart .nui-chart-other-series.tilebox .tilebox-unit,.nui-chart .nui-chart-baseline-series.tilebox .tilebox-unit{color:var(--nui-color-text-default,#111)}.sw-mark-layer .nui-chart .nui-chart-baseline-series{mix-blend-mode:multiply}.nui-chart .nui-chart-no-data-line{shape-rendering:auto;stroke-dasharray:1,3;stroke-width:unset;fill:none}.nui-chart .bar-outline{stroke-width:1px;stroke:var(--nui-color-bg-light,#fff)}.nui-chart-grid .sw-axis .domain{display:none}.nui-chart-grid .sw-axis path,.nui-chart-grid .sw-axis line{stroke:var(--nui-color-line-strong,#999999);fill:none;shape-rendering:crispEdges}.nui-chart-grid .sw-axis line.nui-regular-line{stroke-dasharray:1 1}.nui-chart-grid .sw-axis text{fill:var(--nui-color-text-secondary,rgba(17, 17, 17, .6));font-size:11px}.nui-chart-grid .sw-axis text.chart-label{font-weight:700}.nui-chart-grid .sw-axis-grid{stroke-dasharray:1 1}.nui-chart-grid .sw-axis-grid line{stroke:var(--nui-color-line-default-transparent,rgba(17, 17, 17, .15))}.nui-chart-grid .sw-axis-grid line.nui-zero-line{opacity:.5;stroke-dasharray:none;stroke:var(--nui-color-line-dark,#999999)}.nui-chart-grid .gauge-labels{transition-property:opacity;transition-duration:.2s}.nui-chart-grid .gauge-labels text{fill:var(--nui-color-text-secondary,rgba(17, 17, 17, .6));font-size:11px}.nui-chart-border{stroke:var(--nui-color-line-strong,#999999);stroke-width:1px;shape-rendering:crispEdges}.nui-chart-border--thick{stroke-width:3px}.nui-chart-highlight-tooltip-text{fill:var(--nui-color-text-light,#fff);font-weight:800}.data-series-container{transition-property:opacity;transition-duration:.2s}.nui-chart .pointer-events{pointer-events:auto}.nui-chart .pointer-events-click{cursor:pointer}.nui-chart .mouse-interactive-area{cursor:crosshair}.nui-chart .interaction-line{stroke:var(--nui-color-bg-inverse,#111);stroke-width:1px;shape-rendering:crispEdges}.nui-chart .interaction-label{fill:var(--nui-color-bg-inverse,#111)}.nui-chart .interaction-label__text{fill:var(--nui-color-text-inverse,#fff)}.nui-chart--path__outline{vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-linejoin:round;stroke-width:1px;stroke:var(--nui-color-bg-light,#fff)}.nui-chart--path__outline-fill{fill:var(--nui-color-bg-light,#fff)}.nui-chart-tooltip-pane{pointer-events:none!important}.nui-chart .timeseries-zoom-brush{stroke:var(--nui-shadow-color-stronger,rgba(17, 17, 17, .6));stroke-width:1px;shape-rendering:crispEdges}.nui-chart .lasagna-layer-timeseries-zoom-brush .brush .handle{display:none}.nui-chart .lasagna-layer-timeseries-zoom-brush .brush .selection{cursor:crosshair}_:-ms-lang(x),.nui-chart--path__outline{stroke-width:1px}.nui-chart-area,.nui-chart-line-cap{stroke:var(--nui-color-bg-light,#fff);stroke-width:1px}.nui-chart-layout{display:grid;grid-template:"axis-label-left axis-label-right ." 0fr "chart chart legend" 1fr "axis-label-bottom axis-label-bottom ." 0fr "legend-bottom legend-bottom ." 0fr / 1fr 1fr auto}.nui-chart-layout .axis-label-left{grid-area:axis-label-left;justify-self:start;margin-bottom:5px;margin-right:5px}.nui-chart-layout .axis-label-right{grid-area:axis-label-right;justify-self:end;margin-bottom:5px;margin-left:5px}.nui-chart-layout .axis-label-bottom{grid-area:axis-label-bottom;justify-self:center;margin-top:5px}.nui-chart-layout .chart{grid-area:chart;display:flex;justify-content:stretch}.nui-chart-layout .chart.has-overlay{position:relative}.nui-chart-layout .chart.has-overlay .overlay{position:absolute;box-sizing:border-box;width:100%;height:100%;display:flex;justify-content:center;align-items:center;pointer-events:none}.nui-chart-layout .legend{grid-area:legend;align-self:start;padding-left:5px}.nui-chart-layout .legend.scrollable{overflow:auto;height:100%}.nui-chart-layout .legend-bottom{grid-area:legend-bottom;justify-self:center;margin-top:5px}@media print{.nui-chart-layout{break-inside:avoid}}.nui-legend-series{padding:2px;max-width:250px;cursor:default;background-color:var(--nui-color-bg-content,#fff)}.nui-legend-series:not(.nui-legend-series--horizontal):not(:last-child){margin-bottom:1px}.nui-legend-series .nui-legend-series__tile-wrapper{display:flex;justify-content:center}.nui-legend-series .nui-legend-series__tile{display:flex}.nui-legend-series--horizontal:not(:last-child){margin-right:10px}.nui-legend-series:empty{display:none}.nui-legend-series.description-min-width--unset .description{min-width:unset!important}.nui-legend-series .description{line-height:18px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;padding-left:5px;padding-right:5px;min-width:130px}.nui-legend-series .description-container{overflow:hidden}.nui-legend-series .description-primary{font-weight:600;color:var(--nui-color-text-default,#111)}.nui-legend-series .description-primary:not(:last-child){margin-bottom:-3px}.nui-legend-series .description-secondary{color:var(--nui-color-text-secondary,rgba(17, 17, 17, .6))}.nui-legend-series .description-secondary:not(:first-child){margin-top:-1px}.nui-legend-series .legend-menu{display:none;align-items:center}.nui-legend-series:hover .legend-menu{display:flex}.nui-legend-series--interactive{cursor:pointer}.nui-legend-series--interactive .nui-legend-series__tile-wrapper{position:relative}.nui-legend-series--interactive .nui-legend-series__tile-wrapper .nui-legend-series__checkbox-wrapper{align-self:center;position:absolute;visibility:hidden;top:50%;left:50%;transform:translate(-50%,-50%)}.nui-legend-series--interactive .nui-legend-series__tile-wrapper .nui-legend-series__checkbox-mark{border:solid 2px;background:no-repeat 0 center;border-color:var(--nui-color-active,#0079aa);background-color:var(--nui-color-bg-content,#fff);background-size:16px;border-radius:3px;min-width:16px;width:16px;height:16px;transition:background-color .3s,border-color .3s}.nui-legend-series--interactive .nui-legend-series__tile-wrapper .nui-legend-series__checkbox-glyph{width:100%;height:100%;background-size:12px;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMjAgMjAiIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjAgMjA7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS54dWktY2hlY2tib3gtZ2x5cGh7ZmlsbDpub25lO3N0cm9rZTojRkZGRkZGO3N0cm9rZS13aWR0aDozO3N0cm9rZS1taXRlcmxpbWl0OjEwO3N0cm9rZS1saW5lY2FwOnJvdW5kO30KPC9zdHlsZT4KPHBvbHlsaW5lIGNsYXNzPSJ4dWktY2hlY2tib3gtZ2x5cGgiIHBvaW50cz0iMTcsNCA4LDE1IDMsOSAiLz4KPC9zdmc+);display:none}.nui-legend-series--interactive .nui-legend-series__tile-wrapper .nui-legend-series__checkbox--checked .nui-legend-series__checkbox-mark{background-color:var(--nui-color-active,#0079aa);border-color:var(--nui-color-active,#0079aa)}.nui-legend-series--interactive .nui-legend-series__tile-wrapper .nui-legend-series__checkbox--checked .nui-legend-series__checkbox-mark>.nui-legend-series__checkbox-glyph{display:block}.nui-legend-series--interactive .nui-legend-series--deselected .nui-legend-series__checkbox-wrapper,.nui-legend-series--interactive .nui-legend-series__tile-wrapper:hover .nui-legend-series__checkbox-wrapper{visibility:visible}.nui-legend-series--interactive .nui-legend-series--deselected .nui-legend-series__tile,.nui-legend-series--interactive .nui-legend-series__tile-wrapper:hover .nui-legend-series__tile{visibility:hidden}.nui-legend-series--interactive .nui-legend-series__tile-wrapper:hover{background-color:var(--nui-color-bg-transparent-hover,rgba(17, 17, 17, .05))}.nui-legend-series--interactive:hover{background-color:var(--nui-color-bg-light-hover,#f2f2f2)}.nui-legend-series--interactive:hover .nui-legend-series--deselected .nui-legend-series__tile-wrapper{background-color:var(--nui-color-bg-transparent-hover,rgba(17, 17, 17, .05))}.nui-legend-series--interactive:not(:hover) .nui-legend-series--deselected .nui-legend-series__tile-wrapper{background-color:var(--nui-color-bg-secondary,#fafafa)}.nui-legend-series:not(:hover) .nui-legend-series--state-hidden .description-container{opacity:.3}.nui-legend-series .nui-legend-series--state-deemphasized{opacity:.3}
|
|
1
|
+
.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%;z-index:1000}.cdk-overlay-backdrop{position:absolute;inset:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0;touch-action:manipulation;z-index:1000;transition:opacity .4s cubic-bezier(.25,.8,.25,1)}@media(prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors:active){.cdk-overlay-backdrop-showing{opacity:.6}}.cdk-overlay-dark-backdrop{background:#00000052}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px;z-index:1000}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}.nui-chart{display:block;height:100%;width:100%}.nui-chart .hidden{display:none}.nui-chart svg{display:block}.nui-chart .sw-hidden{opacity:0;visibility:hidden}.nui-chart .tick-hidden-text text{opacity:0}.nui-chart .sw-line{fill:none;stroke-width:2px;shape-rendering:auto}.nui-chart .sw-interaction-layer .tooltip-group text{font-size:12px}.nui-chart .sw-interaction-layer .tooltip-group .nui-chart-highlight-tooltip-marker{stroke:#fff}.nui-chart .sw-interaction-layer .tooltip-group .nui-chart-highlight-tooltip-bg{fill:var(--nui-color-bg-mid_dark,#333)}.nui-chart .nui-chart-hidden{visibility:hidden}.nui-chart .brush .selection{fill:var(--nui-color-active,#0079aa);fill-opacity:.2}.nui-chart nui-chart-point-marker[color-index="2"] .nui-chart-point-marker,.nui-chart nui-chart-point-marker[color-index="8"] .nui-chart-point-marker,.nui-chart nui-chart-point-marker[color-index="14"] .nui-chart-point-marker{shape-rendering:crispEdges}.nui-chart .nui-chart-column-separator{stroke:#fff;stroke-width:1}.nui-chart .nui-chart-trend-line{stroke:var(--black,#111);stroke-width:1}.nui-chart .trend-line-arrow{fill:var(--black,#111)}.nui-chart .nui-chart-threshold-lines .nui-chart-threshold-error,.nui-chart .nui-chart-threshold-lines .nui-chart-threshold-warning{fill-opacity:1}.nui-chart .nui-chart-highlight-tooltip-text{font-weight:800}.nui-chart .nui-chart-point-marker-hidden{visibility:hidden}.nui-chart .nui-chart-percentile-line{stroke-width:2px;stroke-dasharray:5,5,2,5}.nui-chart .nui-chart-percentile-text{font-size:10px;font-weight:600}.nui-chart .nui-chart-annotation-line{stroke-width:1px;shape-rendering:crispEdges;pointer-events:none}.nui-chart .nui-chart-annotation-line--hover{stroke:var(--nui-color-text-link,#006791)}.nui-chart .nui-chart-annotation-note{fill:var(--nui-color-text-link,#006791);font-weight:600;mix-blend-mode:hue}.nui-chart .nui-chart-annotation-hover-rect{fill:transparent;cursor:pointer}.nui-chart .nui-chart-annotation-hover-rect--hidden{fill:transparent}.nui-chart .nui-chart-annotation-background-rect{fill:var(--white,#fff)}.nui-chart .nui-chart-annotation-hover-highlight{fill-opacity:.2}.nui-chart .nui-chart-annotation-hover-highlight--hidden{fill:transparent}.nui-chart .nui-chart-annotation-hover-marker{stroke:var(--nui-color-text-link,#006791);pointer-events:none}.nui-chart .nui-chart-other-series.tilebox .tilebox-value,.nui-chart .nui-chart-baseline-series.tilebox .tilebox-value,.nui-chart .nui-chart-other-series.tilebox .tilebox-unit,.nui-chart .nui-chart-baseline-series.tilebox .tilebox-unit{color:var(--nui-color-text-default,#111)}.sw-mark-layer .nui-chart .nui-chart-baseline-series{mix-blend-mode:multiply}.nui-chart .nui-chart-no-data-line{shape-rendering:auto;stroke-dasharray:1,3;stroke-width:unset;fill:none}.nui-chart .bar-outline{stroke-width:1px;stroke:var(--nui-color-bg-light,#fff)}.nui-chart-grid .sw-axis .domain{display:none}.nui-chart-grid .sw-axis path,.nui-chart-grid .sw-axis line{stroke:var(--nui-color-line-strong,#999999);fill:none;shape-rendering:crispEdges}.nui-chart-grid .sw-axis line.nui-regular-line{stroke-dasharray:1 1}.nui-chart-grid .sw-axis text{fill:var(--nui-color-text-secondary,rgba(17, 17, 17, .6));font-size:11px}.nui-chart-grid .sw-axis text.chart-label{font-weight:700}.nui-chart-grid .sw-axis-grid{stroke-dasharray:1 1}.nui-chart-grid .sw-axis-grid line{stroke:var(--nui-color-line-default-transparent,rgba(17, 17, 17, .15))}.nui-chart-grid .sw-axis-grid line.nui-zero-line{opacity:.5;stroke-dasharray:none;stroke:var(--nui-color-line-dark,#999999)}.nui-chart-grid .gauge-labels{transition-property:opacity;transition-duration:.2s}.nui-chart-grid .gauge-labels text{fill:var(--nui-color-text-secondary,rgba(17, 17, 17, .6));font-size:11px}.nui-chart-border{stroke:var(--nui-color-line-strong,#999999);stroke-width:1px;shape-rendering:crispEdges}.nui-chart-border--thick{stroke-width:3px}.nui-chart-highlight-tooltip-text{fill:var(--nui-color-text-light,#fff);font-weight:800}.data-series-container{transition-property:opacity;transition-duration:.2s}.nui-chart .pointer-events{pointer-events:auto}.nui-chart .pointer-events-click{cursor:pointer}.nui-chart .mouse-interactive-area{cursor:crosshair}.nui-chart .interaction-line{stroke:var(--nui-color-bg-inverse,#111);stroke-width:1px;shape-rendering:crispEdges}.nui-chart .interaction-label{fill:var(--nui-color-bg-inverse,#111)}.nui-chart .interaction-label__text{fill:var(--nui-color-text-inverse,#fff)}.nui-chart--path__outline{vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-linejoin:round;stroke-width:1px;stroke:var(--nui-color-bg-light,#fff)}.nui-chart--path__outline-fill{fill:var(--nui-color-bg-light,#fff)}.nui-chart-tooltip-pane{pointer-events:none!important}.nui-chart .timeseries-zoom-brush{stroke:var(--nui-shadow-color-stronger,rgba(17, 17, 17, .6));stroke-width:1px;shape-rendering:crispEdges}.nui-chart .lasagna-layer-timeseries-zoom-brush .brush .handle{display:none}.nui-chart .lasagna-layer-timeseries-zoom-brush .brush .selection{cursor:crosshair}_:-ms-lang(x),.nui-chart--path__outline{stroke-width:1px}.nui-chart-area,.nui-chart-line-cap{stroke:var(--nui-color-bg-light,#fff);stroke-width:1px}nui-chart.nui-chart--keyboard-tooltips:focus-visible{outline:none;box-shadow:inset 0 0 0 2px #00c4d280}.nui-chart-layout{display:grid;grid-template:"axis-label-left axis-label-right ." 0fr "chart chart legend" 1fr "axis-label-bottom axis-label-bottom ." 0fr "legend-bottom legend-bottom ." 0fr / 1fr 1fr auto}.nui-chart-layout .axis-label-left{grid-area:axis-label-left;justify-self:start;margin-bottom:5px;margin-right:5px}.nui-chart-layout .axis-label-right{grid-area:axis-label-right;justify-self:end;margin-bottom:5px;margin-left:5px}.nui-chart-layout .axis-label-bottom{grid-area:axis-label-bottom;justify-self:center;margin-top:5px}.nui-chart-layout .chart{grid-area:chart;display:flex;justify-content:stretch}.nui-chart-layout .chart.has-overlay{position:relative}.nui-chart-layout .chart.has-overlay .overlay{position:absolute;box-sizing:border-box;width:100%;height:100%;display:flex;justify-content:center;align-items:center;pointer-events:none}.nui-chart-layout .legend{grid-area:legend;align-self:start;padding-left:5px}.nui-chart-layout .legend.scrollable{overflow:auto;height:100%}.nui-chart-layout .legend-bottom{grid-area:legend-bottom;justify-self:center;margin-top:5px}@media print{.nui-chart-layout{break-inside:avoid}}.nui-legend-series{padding:2px;max-width:250px;cursor:default;background-color:var(--nui-color-bg-content,#fff)}.nui-legend-series:not(.nui-legend-series--horizontal):not(:last-child){margin-bottom:1px}.nui-legend-series .nui-legend-series__tile-wrapper{display:flex;justify-content:center}.nui-legend-series .nui-legend-series__tile{display:flex}.nui-legend-series .nui-legend-series__toggle{display:flex;padding:0;border:0;background:none;color:inherit;font:inherit;cursor:inherit}.nui-legend-series .nui-legend-series__toggle:focus-visible{outline:none;box-shadow:0 0 0 2px #00c4d280}.nui-legend-series--horizontal:not(:last-child){margin-right:10px}.nui-legend-series:empty{display:none}.nui-legend-series.description-min-width--unset .description{min-width:unset!important}.nui-legend-series .description{line-height:18px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;padding-left:5px;padding-right:5px;min-width:130px}.nui-legend-series .description-container{overflow:hidden}.nui-legend-series .description-primary{font-weight:600;color:var(--nui-color-text-default,#111)}.nui-legend-series .description-primary:not(:last-child){margin-bottom:-3px}.nui-legend-series .description-secondary{color:var(--nui-color-text-secondary,rgba(17, 17, 17, .6))}.nui-legend-series .description-secondary:not(:first-child){margin-top:-1px}.nui-legend-series .legend-menu{display:none;align-items:center}.nui-legend-series:hover .legend-menu{display:flex}.nui-legend-series--separate-controls:focus-within .legend-menu{display:flex}.nui-legend-series--interactive{cursor:pointer}.nui-legend-series--interactive .nui-legend-series__tile-wrapper{position:relative}.nui-legend-series--interactive .nui-legend-series__tile-wrapper .nui-legend-series__checkbox-wrapper{align-self:center;position:absolute;visibility:hidden;top:50%;left:50%;transform:translate(-50%,-50%)}.nui-legend-series--interactive .nui-legend-series__tile-wrapper .nui-legend-series__checkbox-mark{border:solid 2px;background:no-repeat 0 center;border-color:var(--nui-color-active,#0079aa);background-color:var(--nui-color-bg-content,#fff);background-size:16px;border-radius:3px;min-width:16px;width:16px;height:16px;transition:background-color .3s,border-color .3s}.nui-legend-series--interactive .nui-legend-series__tile-wrapper .nui-legend-series__checkbox-glyph{width:100%;height:100%;background-size:12px;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMjAgMjAiIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjAgMjA7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS54dWktY2hlY2tib3gtZ2x5cGh7ZmlsbDpub25lO3N0cm9rZTojRkZGRkZGO3N0cm9rZS13aWR0aDozO3N0cm9rZS1taXRlcmxpbWl0OjEwO3N0cm9rZS1saW5lY2FwOnJvdW5kO30KPC9zdHlsZT4KPHBvbHlsaW5lIGNsYXNzPSJ4dWktY2hlY2tib3gtZ2x5cGgiIHBvaW50cz0iMTcsNCA4LDE1IDMsOSAiLz4KPC9zdmc+);display:none}.nui-legend-series--interactive .nui-legend-series__tile-wrapper .nui-legend-series__checkbox--checked .nui-legend-series__checkbox-mark{background-color:var(--nui-color-active,#0079aa);border-color:var(--nui-color-active,#0079aa)}.nui-legend-series--interactive .nui-legend-series__tile-wrapper .nui-legend-series__checkbox--checked .nui-legend-series__checkbox-mark>.nui-legend-series__checkbox-glyph{display:block}.nui-legend-series--interactive .nui-legend-series--deselected .nui-legend-series__checkbox-wrapper,.nui-legend-series--interactive .nui-legend-series__tile-wrapper:hover .nui-legend-series__checkbox-wrapper{visibility:visible}.nui-legend-series--interactive .nui-legend-series--deselected .nui-legend-series__tile,.nui-legend-series--interactive .nui-legend-series__tile-wrapper:hover .nui-legend-series__tile{visibility:hidden}.nui-legend-series--interactive .nui-legend-series__tile-wrapper:hover{background-color:var(--nui-color-bg-transparent-hover,rgba(17, 17, 17, .05))}.nui-legend-series--interactive:hover{background-color:var(--nui-color-bg-light-hover,#f2f2f2)}.nui-legend-series--interactive:hover .nui-legend-series--deselected .nui-legend-series__tile-wrapper{background-color:var(--nui-color-bg-transparent-hover,rgba(17, 17, 17, .05))}.nui-legend-series--interactive:not(:hover) .nui-legend-series--deselected .nui-legend-series__tile-wrapper{background-color:var(--nui-color-bg-secondary,#fafafa)}.nui-legend-series:not(:hover) .nui-legend-series--state-hidden .description-container{opacity:.3}.nui-legend-series .nui-legend-series--state-deemphasized{opacity:.3}
|
|
@@ -2,7 +2,7 @@ import * as i1$1 from '@angular/cdk/overlay';
|
|
|
2
2
|
import { OverlayModule } from '@angular/cdk/overlay';
|
|
3
3
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { Input, ChangeDetectionStrategy, Component, Directive, InjectionToken, ViewChildren, EventEmitter, ViewChild, Output, forwardRef,
|
|
5
|
+
import { Input, ChangeDetectionStrategy, Component, Directive, InjectionToken, ViewChildren, EventEmitter, ViewChild, Output, Injectable, inject, forwardRef, HostListener, HostBinding, Inject, ViewEncapsulation, Optional, Host, NgModule } from '@angular/core';
|
|
6
6
|
import { Subject, BehaviorSubject, of } from 'rxjs';
|
|
7
7
|
import { trigger, transition, style, animate } from '@angular/animations';
|
|
8
8
|
import * as i1 from '@angular/common';
|
|
@@ -536,9 +536,11 @@ class Renderer {
|
|
|
536
536
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
537
537
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
538
538
|
// THE SOFTWARE.
|
|
539
|
-
/**
|
|
539
|
+
/** Chart interaction types */
|
|
540
540
|
var InteractionType;
|
|
541
541
|
(function (InteractionType) {
|
|
542
|
+
/** Indicates keyboard inspection of a data point */
|
|
543
|
+
InteractionType["Keyboard"] = "keyboard";
|
|
542
544
|
/** Indicates that an element has been clicked */
|
|
543
545
|
InteractionType["Click"] = "click";
|
|
544
546
|
/** Indicates that an element is hovered */
|
|
@@ -951,6 +953,7 @@ class ChartTooltipsPlugin extends ChartPlugin {
|
|
|
951
953
|
isChartInView = false;
|
|
952
954
|
destroy$ = new Subject();
|
|
953
955
|
seriesVisibilityMap = {};
|
|
956
|
+
keyboardHighlightedSeries = new Set();
|
|
954
957
|
/**
|
|
955
958
|
* @param tooltipPositionOffset Offset of a tooltip from edge of a highlighted element
|
|
956
959
|
* @param orientation
|
|
@@ -972,8 +975,9 @@ class ChartTooltipsPlugin extends ChartPlugin {
|
|
|
972
975
|
.getStream(INTERACTION_DATA_POINTS_EVENT)
|
|
973
976
|
.pipe(takeUntil(this.destroy$))
|
|
974
977
|
.subscribe((event) => {
|
|
975
|
-
if (event.data.interactionType === InteractionType.MouseMove &&
|
|
976
|
-
this.isChartInView)
|
|
978
|
+
if ((event.data.interactionType === InteractionType.MouseMove &&
|
|
979
|
+
this.isChartInView) ||
|
|
980
|
+
event.data.interactionType === InteractionType.Keyboard) {
|
|
977
981
|
const dataPoints = event.data.dataPoints;
|
|
978
982
|
this.processHighlightedDataPoints(dataPoints);
|
|
979
983
|
}
|
|
@@ -1003,6 +1007,81 @@ class ChartTooltipsPlugin extends ChartPlugin {
|
|
|
1003
1007
|
this.destroy$.next();
|
|
1004
1008
|
this.destroy$.complete();
|
|
1005
1009
|
}
|
|
1010
|
+
/**
|
|
1011
|
+
* Number of positional data indices available for keyboard tooltip inspection.
|
|
1012
|
+
* Series with unequal domains are not aligned by this basic navigation mode.
|
|
1013
|
+
*/
|
|
1014
|
+
getKeyboardDataPointCount() {
|
|
1015
|
+
return this.getKeyboardSeries().reduce((count, series) => Math.max(count, series.data.length), 0);
|
|
1016
|
+
}
|
|
1017
|
+
/** Inspect the same positional index in each visible series. */
|
|
1018
|
+
showForIndex(index) {
|
|
1019
|
+
if (!Number.isInteger(index) ||
|
|
1020
|
+
index < 0 ||
|
|
1021
|
+
index >= this.getKeyboardDataPointCount()) {
|
|
1022
|
+
throw new RangeError("Data point index is outside visible chart data");
|
|
1023
|
+
}
|
|
1024
|
+
this.resetKeyboardHighlights();
|
|
1025
|
+
const dataPoints = {};
|
|
1026
|
+
for (const series of this.getKeyboardSeries()) {
|
|
1027
|
+
if (index >= series.data.length) {
|
|
1028
|
+
continue;
|
|
1029
|
+
}
|
|
1030
|
+
const position = series.renderer.getDataPointPosition(series, index, series.scales);
|
|
1031
|
+
if (!position ||
|
|
1032
|
+
!Number.isFinite(position.x) ||
|
|
1033
|
+
!Number.isFinite(position.y)) {
|
|
1034
|
+
continue;
|
|
1035
|
+
}
|
|
1036
|
+
dataPoints[series.id] = {
|
|
1037
|
+
seriesId: series.id,
|
|
1038
|
+
dataSeries: series,
|
|
1039
|
+
index,
|
|
1040
|
+
data: series.data[index],
|
|
1041
|
+
position,
|
|
1042
|
+
};
|
|
1043
|
+
this.chart.getRenderEngine().highlightDataPoint(series.id, index);
|
|
1044
|
+
this.keyboardHighlightedSeries.add(series.id);
|
|
1045
|
+
}
|
|
1046
|
+
this.publishKeyboardDataPoints(dataPoints);
|
|
1047
|
+
}
|
|
1048
|
+
hideKeyboardTooltips() {
|
|
1049
|
+
this.resetKeyboardHighlights();
|
|
1050
|
+
const dataPoints = {};
|
|
1051
|
+
for (const series of this.getKeyboardSeries()) {
|
|
1052
|
+
dataPoints[series.id] = {
|
|
1053
|
+
seriesId: series.id,
|
|
1054
|
+
dataSeries: series,
|
|
1055
|
+
index: DATA_POINT_INTERACTION_RESET,
|
|
1056
|
+
data: null,
|
|
1057
|
+
};
|
|
1058
|
+
}
|
|
1059
|
+
this.publishKeyboardDataPoints(dataPoints);
|
|
1060
|
+
}
|
|
1061
|
+
getKeyboardSeries() {
|
|
1062
|
+
return this.chart
|
|
1063
|
+
.getDataManager()
|
|
1064
|
+
.chartSeriesSet.filter(series => this.seriesVisibilityMap[series.id] ??
|
|
1065
|
+
series.renderState !== RenderState.hidden);
|
|
1066
|
+
}
|
|
1067
|
+
resetKeyboardHighlights() {
|
|
1068
|
+
for (const seriesId of this.keyboardHighlightedSeries) {
|
|
1069
|
+
if (this.chart.getDataManager().getChartSeries(seriesId)) {
|
|
1070
|
+
this.chart
|
|
1071
|
+
.getRenderEngine()
|
|
1072
|
+
.highlightDataPoint(seriesId, DATA_POINT_INTERACTION_RESET);
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
this.keyboardHighlightedSeries.clear();
|
|
1076
|
+
}
|
|
1077
|
+
publishKeyboardDataPoints(dataPoints) {
|
|
1078
|
+
this.chart
|
|
1079
|
+
.getEventBus()
|
|
1080
|
+
.getStream(INTERACTION_DATA_POINTS_EVENT)
|
|
1081
|
+
.next({
|
|
1082
|
+
data: { interactionType: InteractionType.Keyboard, dataPoints },
|
|
1083
|
+
});
|
|
1084
|
+
}
|
|
1006
1085
|
processHighlightedDataPoints(dataPoints) {
|
|
1007
1086
|
const validDataPoints = pickBy(dataPoints, (d) => d.index >= 0 &&
|
|
1008
1087
|
d.position &&
|
|
@@ -1562,6 +1641,100 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
1562
1641
|
args: ["svgContent"]
|
|
1563
1642
|
}] } });
|
|
1564
1643
|
|
|
1644
|
+
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
1645
|
+
//
|
|
1646
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1647
|
+
// of this software and associated documentation files (the "Software"), to
|
|
1648
|
+
// deal in the Software without restriction, including without limitation the
|
|
1649
|
+
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
1650
|
+
// sell copies of the Software, and to permit persons to whom the Software is
|
|
1651
|
+
// furnished to do so, subject to the following conditions:
|
|
1652
|
+
//
|
|
1653
|
+
// The above copyright notice and this permission notice shall be included in
|
|
1654
|
+
// all copies or substantial portions of the Software.
|
|
1655
|
+
//
|
|
1656
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1657
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1658
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1659
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1660
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1661
|
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1662
|
+
// THE SOFTWARE.
|
|
1663
|
+
class ChartKeyboardTooltipController {
|
|
1664
|
+
dataPointIndex = 0;
|
|
1665
|
+
inspectionActive = false;
|
|
1666
|
+
onConfigurationChange(previousPlugin, currentPlugin, changed) {
|
|
1667
|
+
if (!this.inspectionActive || !changed) {
|
|
1668
|
+
return;
|
|
1669
|
+
}
|
|
1670
|
+
(previousPlugin ?? currentPlugin)?.hideKeyboardTooltips();
|
|
1671
|
+
this.inspectionActive = false;
|
|
1672
|
+
this.dataPointIndex = 0;
|
|
1673
|
+
}
|
|
1674
|
+
onFocus(plugin, isFocusVisible) {
|
|
1675
|
+
this.dataPointIndex = -1;
|
|
1676
|
+
if (isFocusVisible) {
|
|
1677
|
+
this.dataPointIndex = 0;
|
|
1678
|
+
this.showKeyboardTooltip(plugin);
|
|
1679
|
+
}
|
|
1680
|
+
}
|
|
1681
|
+
onKeydown(event, plugin, host) {
|
|
1682
|
+
if (!plugin ||
|
|
1683
|
+
event.target !== host ||
|
|
1684
|
+
event.altKey ||
|
|
1685
|
+
event.ctrlKey ||
|
|
1686
|
+
event.metaKey ||
|
|
1687
|
+
event.shiftKey) {
|
|
1688
|
+
return;
|
|
1689
|
+
}
|
|
1690
|
+
if (event.key === "Escape") {
|
|
1691
|
+
if (!this.inspectionActive) {
|
|
1692
|
+
return;
|
|
1693
|
+
}
|
|
1694
|
+
event.preventDefault();
|
|
1695
|
+
event.stopPropagation();
|
|
1696
|
+
plugin.hideKeyboardTooltips();
|
|
1697
|
+
this.inspectionActive = false;
|
|
1698
|
+
return;
|
|
1699
|
+
}
|
|
1700
|
+
if (event.key !== "ArrowLeft" && event.key !== "ArrowRight") {
|
|
1701
|
+
return;
|
|
1702
|
+
}
|
|
1703
|
+
const count = plugin.getKeyboardDataPointCount();
|
|
1704
|
+
if (count === 0) {
|
|
1705
|
+
plugin.hideKeyboardTooltips();
|
|
1706
|
+
return;
|
|
1707
|
+
}
|
|
1708
|
+
event.preventDefault();
|
|
1709
|
+
event.stopPropagation();
|
|
1710
|
+
this.dataPointIndex = Math.max(0, Math.min(count - 1, this.dataPointIndex + (event.key === "ArrowRight" ? 1 : -1)));
|
|
1711
|
+
this.showKeyboardTooltip(plugin);
|
|
1712
|
+
}
|
|
1713
|
+
onBlur(plugin) {
|
|
1714
|
+
plugin?.hideKeyboardTooltips();
|
|
1715
|
+
this.dataPointIndex = 0;
|
|
1716
|
+
this.inspectionActive = false;
|
|
1717
|
+
}
|
|
1718
|
+
showKeyboardTooltip(plugin) {
|
|
1719
|
+
if (!plugin) {
|
|
1720
|
+
return;
|
|
1721
|
+
}
|
|
1722
|
+
const count = plugin.getKeyboardDataPointCount();
|
|
1723
|
+
if (count === 0) {
|
|
1724
|
+
plugin.hideKeyboardTooltips();
|
|
1725
|
+
return;
|
|
1726
|
+
}
|
|
1727
|
+
this.dataPointIndex = Math.min(this.dataPointIndex, count - 1);
|
|
1728
|
+
plugin.showForIndex(this.dataPointIndex);
|
|
1729
|
+
this.inspectionActive = true;
|
|
1730
|
+
}
|
|
1731
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ChartKeyboardTooltipController, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1732
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ChartKeyboardTooltipController });
|
|
1733
|
+
}
|
|
1734
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ChartKeyboardTooltipController, decorators: [{
|
|
1735
|
+
type: Injectable
|
|
1736
|
+
}] });
|
|
1737
|
+
|
|
1565
1738
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
1566
1739
|
//
|
|
1567
1740
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
@@ -1588,6 +1761,14 @@ class ChartComponent {
|
|
|
1588
1761
|
chart;
|
|
1589
1762
|
/** Accessible name for the chart. Should be a localized string describing the chart content (WCAG 1.1.1). */
|
|
1590
1763
|
ariaLabel;
|
|
1764
|
+
/** Opt-in positional tooltip navigation; intended for series with aligned data indices. */
|
|
1765
|
+
keyboardTooltips;
|
|
1766
|
+
get keyboardTabIndex() {
|
|
1767
|
+
return this.keyboardTooltips ? 0 : null;
|
|
1768
|
+
}
|
|
1769
|
+
get hasKeyboardTooltips() {
|
|
1770
|
+
return !!this.keyboardTooltips;
|
|
1771
|
+
}
|
|
1591
1772
|
// Only expose role="img" when an accessible name is present; an img role
|
|
1592
1773
|
// without a name is a WCAG 1.1.1 violation (axe: role-img-alt). When no
|
|
1593
1774
|
// ariaLabel is supplied the inner svg stays aria-hidden, so the chart is
|
|
@@ -1601,16 +1782,21 @@ class ChartComponent {
|
|
|
1601
1782
|
resizeObserver;
|
|
1602
1783
|
resizeHandler;
|
|
1603
1784
|
intersectionObserver;
|
|
1785
|
+
keyboardTooltipController = inject(ChartKeyboardTooltipController);
|
|
1786
|
+
/* eslint-disable @angular-eslint/prefer-inject -- Preserve the public constructor signature for existing consumers. */
|
|
1604
1787
|
constructor(elRef, ngZone, cd) {
|
|
1605
1788
|
this.elRef = elRef;
|
|
1606
1789
|
this.ngZone = ngZone;
|
|
1607
1790
|
this.cd = cd;
|
|
1608
1791
|
}
|
|
1792
|
+
/* eslint-enable @angular-eslint/prefer-inject */
|
|
1609
1793
|
ngOnInit() {
|
|
1610
1794
|
this.intersectionObserver = new IntersectionObserver(this.intersectionObserverCallback);
|
|
1611
1795
|
this.intersectionObserver.observe(this.elRef.nativeElement);
|
|
1612
1796
|
}
|
|
1613
1797
|
ngOnChanges(changes) {
|
|
1798
|
+
const previousPlugin = changes["keyboardTooltips"]?.previousValue ?? this.keyboardTooltips;
|
|
1799
|
+
this.keyboardTooltipController.onConfigurationChange(previousPlugin, this.keyboardTooltips, !!changes["keyboardTooltips"] || !!changes["chart"]);
|
|
1614
1800
|
if (changes["chart"]) {
|
|
1615
1801
|
const previousChart = changes["chart"].previousValue;
|
|
1616
1802
|
if (previousChart) {
|
|
@@ -1622,6 +1808,15 @@ class ChartComponent {
|
|
|
1622
1808
|
}
|
|
1623
1809
|
}
|
|
1624
1810
|
}
|
|
1811
|
+
onKeyboardFocus() {
|
|
1812
|
+
this.keyboardTooltipController.onFocus(this.keyboardTooltips, this.elRef.nativeElement.matches(":focus-visible"));
|
|
1813
|
+
}
|
|
1814
|
+
onKeyboardNavigation(event) {
|
|
1815
|
+
this.keyboardTooltipController.onKeydown(event, this.keyboardTooltips, this.elRef.nativeElement);
|
|
1816
|
+
}
|
|
1817
|
+
onKeyboardBlur() {
|
|
1818
|
+
this.keyboardTooltipController.onBlur(this.keyboardTooltips);
|
|
1819
|
+
}
|
|
1625
1820
|
ngAfterContentInit() {
|
|
1626
1821
|
this.chart
|
|
1627
1822
|
.getEventBus()
|
|
@@ -1658,7 +1853,8 @@ class ChartComponent {
|
|
|
1658
1853
|
.next({ data });
|
|
1659
1854
|
};
|
|
1660
1855
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ChartComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1661
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: ChartComponent, isStandalone: false, selector: "nui-chart", inputs: { chart: "chart", ariaLabel: "ariaLabel" }, host: { properties: { "attr.role": "this.role", "attr.aria-label": "this.a11yLabel" } }, providers: [
|
|
1856
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: ChartComponent, isStandalone: false, selector: "nui-chart", inputs: { chart: "chart", ariaLabel: "ariaLabel", keyboardTooltips: "keyboardTooltips" }, host: { listeners: { "focus": "onKeyboardFocus()", "keydown": "onKeyboardNavigation($event)", "blur": "onKeyboardBlur()" }, properties: { "attr.tabindex": "this.keyboardTabIndex", "class.nui-chart--keyboard-tooltips": "this.hasKeyboardTooltips", "attr.role": "this.role", "attr.aria-label": "this.a11yLabel" } }, providers: [
|
|
1857
|
+
ChartKeyboardTooltipController,
|
|
1662
1858
|
{
|
|
1663
1859
|
provide: CHART_COMPONENT,
|
|
1664
1860
|
useExisting: forwardRef(() => ChartComponent),
|
|
@@ -1671,23 +1867,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
1671
1867
|
selector: "nui-chart",
|
|
1672
1868
|
template: "",
|
|
1673
1869
|
providers: [
|
|
1870
|
+
ChartKeyboardTooltipController,
|
|
1674
1871
|
{
|
|
1675
1872
|
provide: CHART_COMPONENT,
|
|
1676
1873
|
useExisting: forwardRef(() => ChartComponent),
|
|
1677
1874
|
},
|
|
1678
1875
|
],
|
|
1876
|
+
// eslint-disable-next-line @angular-eslint/prefer-standalone -- Preserve the existing NgModule-based library API.
|
|
1679
1877
|
standalone: false,
|
|
1680
1878
|
}]
|
|
1681
1879
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { chart: [{
|
|
1682
1880
|
type: Input
|
|
1683
1881
|
}], ariaLabel: [{
|
|
1684
1882
|
type: Input
|
|
1883
|
+
}], keyboardTooltips: [{
|
|
1884
|
+
type: Input
|
|
1885
|
+
}], keyboardTabIndex: [{
|
|
1886
|
+
type: HostBinding,
|
|
1887
|
+
args: ["attr.tabindex"]
|
|
1888
|
+
}], hasKeyboardTooltips: [{
|
|
1889
|
+
type: HostBinding,
|
|
1890
|
+
args: ["class.nui-chart--keyboard-tooltips"]
|
|
1685
1891
|
}], role: [{
|
|
1686
1892
|
type: HostBinding,
|
|
1687
1893
|
args: ["attr.role"]
|
|
1688
1894
|
}], a11yLabel: [{
|
|
1689
1895
|
type: HostBinding,
|
|
1690
1896
|
args: ["attr.aria-label"]
|
|
1897
|
+
}], onKeyboardFocus: [{
|
|
1898
|
+
type: HostListener,
|
|
1899
|
+
args: ["focus"]
|
|
1900
|
+
}], onKeyboardNavigation: [{
|
|
1901
|
+
type: HostListener,
|
|
1902
|
+
args: ["keydown", ["$event"]]
|
|
1903
|
+
}], onKeyboardBlur: [{
|
|
1904
|
+
type: HostListener,
|
|
1905
|
+
args: ["blur"]
|
|
1691
1906
|
}] } });
|
|
1692
1907
|
|
|
1693
1908
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
@@ -2130,6 +2345,18 @@ class LegendSeriesComponent {
|
|
|
2130
2345
|
* Set whether the series is selected
|
|
2131
2346
|
*/
|
|
2132
2347
|
isSelected = true;
|
|
2348
|
+
/**
|
|
2349
|
+
* Makes a non-interactive legend item keyboard-focusable without changing
|
|
2350
|
+
* its listitem role or enabling the series visibility checkbox.
|
|
2351
|
+
* Project independent action controls with the legendAction attribute.
|
|
2352
|
+
*/
|
|
2353
|
+
focusable = false;
|
|
2354
|
+
/**
|
|
2355
|
+
* Moves the checkbox from the host to the tile so projected actions remain independent.
|
|
2356
|
+
*/
|
|
2357
|
+
separateControls = false;
|
|
2358
|
+
/** Accessible name of the tile checkbox when separateControls is enabled. */
|
|
2359
|
+
toggleAriaLabel = $localize `Toggle series visibility`;
|
|
2133
2360
|
/**
|
|
2134
2361
|
* Emits an event with a boolean value indicating a new selected status
|
|
2135
2362
|
*/
|
|
@@ -2163,21 +2390,29 @@ class LegendSeriesComponent {
|
|
|
2163
2390
|
get isInteractiveClassApplied() {
|
|
2164
2391
|
return this._interactive;
|
|
2165
2392
|
}
|
|
2393
|
+
get hasSeparateControls() {
|
|
2394
|
+
return this._interactive && this.separateControls;
|
|
2395
|
+
}
|
|
2166
2396
|
isHorizontalClassApplied = false;
|
|
2167
2397
|
get isActiveClassApplied() {
|
|
2168
2398
|
return this._active && this.seriesRenderState !== RenderState.hidden;
|
|
2169
2399
|
}
|
|
2170
2400
|
get role() {
|
|
2171
2401
|
if (this._interactive) {
|
|
2172
|
-
return "checkbox";
|
|
2402
|
+
return this.separateControls ? "group" : "checkbox";
|
|
2173
2403
|
}
|
|
2174
2404
|
return this.legend?.interactive === false ? "listitem" : null;
|
|
2175
2405
|
}
|
|
2176
2406
|
get interactiveTabIndex() {
|
|
2177
|
-
return this.
|
|
2407
|
+
return (this.focusable && !this._interactive) ||
|
|
2408
|
+
(this._interactive && !this.separateControls)
|
|
2409
|
+
? 0
|
|
2410
|
+
: null;
|
|
2178
2411
|
}
|
|
2179
2412
|
get interactiveAriaChecked() {
|
|
2180
|
-
return this._interactive
|
|
2413
|
+
return this._interactive && !this.separateControls
|
|
2414
|
+
? this.isSelected
|
|
2415
|
+
: null;
|
|
2181
2416
|
}
|
|
2182
2417
|
_seriesRenderState;
|
|
2183
2418
|
_active = false;
|
|
@@ -2204,12 +2439,12 @@ class LegendSeriesComponent {
|
|
|
2204
2439
|
}
|
|
2205
2440
|
}
|
|
2206
2441
|
onEnterKey() {
|
|
2207
|
-
if (this.interactive) {
|
|
2442
|
+
if (this.interactive && !this.separateControls) {
|
|
2208
2443
|
this.isSelectedChange.emit(!this.isSelected);
|
|
2209
2444
|
}
|
|
2210
2445
|
}
|
|
2211
2446
|
onSpaceKey(event) {
|
|
2212
|
-
if (this.interactive) {
|
|
2447
|
+
if (this.interactive && !this.separateControls) {
|
|
2213
2448
|
event.preventDefault();
|
|
2214
2449
|
this.isSelectedChange.emit(!this.isSelected);
|
|
2215
2450
|
}
|
|
@@ -2229,11 +2464,11 @@ class LegendSeriesComponent {
|
|
|
2229
2464
|
this.projectedDescription.nativeElement.children.length !== 0);
|
|
2230
2465
|
}
|
|
2231
2466
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: LegendSeriesComponent, deps: [{ token: LegendComponent, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
2232
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: LegendSeriesComponent, isStandalone: false, selector: "nui-legend-series", inputs: { active: "active", interactive: "interactive", isSelected: "isSelected", descriptionPrimary: "descriptionPrimary", descriptionSecondary: "descriptionSecondary", icon: "icon", color: "color", seriesRenderState: "seriesRenderState" }, outputs: { isSelectedChange: "isSelectedChange" }, host: { listeners: { "click": "onClick()", "keydown.enter": "onEnterKey()", "keydown.space": "onSpaceKey($event)" }, properties: { "class.nui-legend-series--interactive": "this.isInteractiveClassApplied", "class.nui-legend-series--horizontal": "this.isHorizontalClassApplied", "class.inverse": "this.isActiveClassApplied", "attr.role": "this.role", "attr.tabindex": "this.interactiveTabIndex", "attr.aria-checked": "this.interactiveAriaChecked" }, classAttribute: "nui-legend-series" }, viewQueries: [{ propertyName: "projectedDescription", first: true, predicate: ["projectedDescription"], descendants: true }], ngImport: i0, template: "<div\n class=\"d-flex\"\n [ngClass]=\"['nui-legend-series--state-' + seriesRenderState]\"\n [class.nui-legend-series--deselected]=\"!isSelected\">\n <div class=\"nui-legend-series__tile-wrapper\">\n <
|
|
2467
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: LegendSeriesComponent, isStandalone: false, selector: "nui-legend-series", inputs: { active: "active", interactive: "interactive", isSelected: "isSelected", focusable: "focusable", separateControls: "separateControls", toggleAriaLabel: "toggleAriaLabel", descriptionPrimary: "descriptionPrimary", descriptionSecondary: "descriptionSecondary", icon: "icon", color: "color", seriesRenderState: "seriesRenderState" }, outputs: { isSelectedChange: "isSelectedChange" }, host: { listeners: { "click": "onClick()", "keydown.enter": "onEnterKey()", "keydown.space": "onSpaceKey($event)" }, properties: { "class.nui-legend-series--interactive": "this.isInteractiveClassApplied", "class.nui-legend-series--separate-controls": "this.hasSeparateControls", "class.nui-legend-series--horizontal": "this.isHorizontalClassApplied", "class.inverse": "this.isActiveClassApplied", "attr.role": "this.role", "attr.tabindex": "this.interactiveTabIndex", "attr.aria-checked": "this.interactiveAriaChecked" }, classAttribute: "nui-legend-series" }, viewQueries: [{ propertyName: "projectedDescription", first: true, predicate: ["projectedDescription"], descendants: true }], ngImport: i0, template: "<div\n class=\"d-flex\"\n [ngClass]=\"['nui-legend-series--state-' + seriesRenderState]\"\n [class.nui-legend-series--deselected]=\"!isSelected\">\n <div class=\"nui-legend-series__tile-wrapper\">\n <button\n *ngIf=\"hasSeparateControls; else tile\"\n class=\"nui-legend-series__toggle\"\n type=\"button\"\n role=\"checkbox\"\n [attr.aria-checked]=\"isSelected\"\n [attr.aria-label]=\"toggleAriaLabel\">\n <ng-container *ngTemplateOutlet=\"tile\"></ng-container>\n </button>\n </div>\n <div\n *ngIf=\"hasInputDescription(); else descriptionTemplate\"\n class=\"description-container nui-text-small d-flex flex-column justify-content-center\">\n <div\n *ngIf=\"!!descriptionPrimary\"\n class=\"description description-primary\"\n [title]=\"descriptionPrimary\">\n {{ descriptionPrimary }}\n </div>\n <div\n *ngIf=\"!!descriptionSecondary\"\n class=\"description description-secondary\"\n [title]=\"descriptionSecondary\">\n {{ descriptionSecondary }}\n </div>\n </div>\n <div class=\"legend-menu\">\n <ng-content select=\"[legendMenu]\"></ng-content>\n </div>\n</div>\n<ng-content select=\"[legendAction]\"></ng-content>\n<ng-template #tile>\n <div class=\"nui-legend-series__tile\">\n <ng-content></ng-content>\n </div>\n <div\n class=\"nui-legend-series__checkbox-wrapper\"\n aria-hidden=\"true\"\n [class.nui-legend-series__checkbox--checked]=\"isSelected\">\n <div class=\"nui-legend-series__checkbox-mark\">\n <i class=\"nui-legend-series__checkbox-glyph\"></i>\n </div>\n </div>\n</ng-template>\n<ng-template #descriptionTemplate>\n <div class=\"d-flex\" #projectedDescription>\n <ng-content select=\"[description]\"></ng-content>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2233
2468
|
}
|
|
2234
2469
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: LegendSeriesComponent, decorators: [{
|
|
2235
2470
|
type: Component,
|
|
2236
|
-
args: [{ host: { class: LEGEND_SERIES_CLASS_NAME }, selector: "nui-legend-series", changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div\n class=\"d-flex\"\n [ngClass]=\"['nui-legend-series--state-' + seriesRenderState]\"\n [class.nui-legend-series--deselected]=\"!isSelected\">\n <div class=\"nui-legend-series__tile-wrapper\">\n <
|
|
2471
|
+
args: [{ host: { class: LEGEND_SERIES_CLASS_NAME }, selector: "nui-legend-series", changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div\n class=\"d-flex\"\n [ngClass]=\"['nui-legend-series--state-' + seriesRenderState]\"\n [class.nui-legend-series--deselected]=\"!isSelected\">\n <div class=\"nui-legend-series__tile-wrapper\">\n <button\n *ngIf=\"hasSeparateControls; else tile\"\n class=\"nui-legend-series__toggle\"\n type=\"button\"\n role=\"checkbox\"\n [attr.aria-checked]=\"isSelected\"\n [attr.aria-label]=\"toggleAriaLabel\">\n <ng-container *ngTemplateOutlet=\"tile\"></ng-container>\n </button>\n </div>\n <div\n *ngIf=\"hasInputDescription(); else descriptionTemplate\"\n class=\"description-container nui-text-small d-flex flex-column justify-content-center\">\n <div\n *ngIf=\"!!descriptionPrimary\"\n class=\"description description-primary\"\n [title]=\"descriptionPrimary\">\n {{ descriptionPrimary }}\n </div>\n <div\n *ngIf=\"!!descriptionSecondary\"\n class=\"description description-secondary\"\n [title]=\"descriptionSecondary\">\n {{ descriptionSecondary }}\n </div>\n </div>\n <div class=\"legend-menu\">\n <ng-content select=\"[legendMenu]\"></ng-content>\n </div>\n</div>\n<ng-content select=\"[legendAction]\"></ng-content>\n<ng-template #tile>\n <div class=\"nui-legend-series__tile\">\n <ng-content></ng-content>\n </div>\n <div\n class=\"nui-legend-series__checkbox-wrapper\"\n aria-hidden=\"true\"\n [class.nui-legend-series__checkbox--checked]=\"isSelected\">\n <div class=\"nui-legend-series__checkbox-mark\">\n <i class=\"nui-legend-series__checkbox-glyph\"></i>\n </div>\n </div>\n</ng-template>\n<ng-template #descriptionTemplate>\n <div class=\"d-flex\" #projectedDescription>\n <ng-content select=\"[description]\"></ng-content>\n </div>\n</ng-template>\n" }]
|
|
2237
2472
|
}], ctorParameters: () => [{ type: LegendComponent, decorators: [{
|
|
2238
2473
|
type: Optional
|
|
2239
2474
|
}, {
|
|
@@ -2244,6 +2479,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
2244
2479
|
type: Input
|
|
2245
2480
|
}], isSelected: [{
|
|
2246
2481
|
type: Input
|
|
2482
|
+
}], focusable: [{
|
|
2483
|
+
type: Input
|
|
2484
|
+
}], separateControls: [{
|
|
2485
|
+
type: Input
|
|
2486
|
+
}], toggleAriaLabel: [{
|
|
2487
|
+
type: Input
|
|
2247
2488
|
}], isSelectedChange: [{
|
|
2248
2489
|
type: Output
|
|
2249
2490
|
}], descriptionPrimary: [{
|
|
@@ -2262,6 +2503,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
2262
2503
|
}], isInteractiveClassApplied: [{
|
|
2263
2504
|
type: HostBinding,
|
|
2264
2505
|
args: [`class.${LEGEND_SERIES_CLASS_NAME}--interactive`]
|
|
2506
|
+
}], hasSeparateControls: [{
|
|
2507
|
+
type: HostBinding,
|
|
2508
|
+
args: [`class.${LEGEND_SERIES_CLASS_NAME}--separate-controls`]
|
|
2265
2509
|
}], isHorizontalClassApplied: [{
|
|
2266
2510
|
type: HostBinding,
|
|
2267
2511
|
args: [`class.${LEGEND_SERIES_CLASS_NAME}--horizontal`]
|
|
@@ -5279,6 +5523,8 @@ class RenderEngine {
|
|
|
5279
5523
|
* @param {number} index The data point index to highlight
|
|
5280
5524
|
*/
|
|
5281
5525
|
highlightDataPoint(seriesId, index) {
|
|
5526
|
+
// A manual highlight must not suppress the next pointer interaction.
|
|
5527
|
+
delete this.highlightedDataPoints[seriesId];
|
|
5282
5528
|
const childContainers = this.getSeriesChildContainers(seriesId);
|
|
5283
5529
|
const chartSeries = this.dataManager.getChartSeries(seriesId);
|
|
5284
5530
|
const renderSeries = {
|
|
@@ -5810,7 +6056,9 @@ class ChartAssist {
|
|
|
5810
6056
|
.getEventBus()
|
|
5811
6057
|
.getStream(INTERACTION_DATA_POINTS_EVENT)
|
|
5812
6058
|
.asObservable()
|
|
5813
|
-
.pipe(filter$1(event => event.data.interactionType ===
|
|
6059
|
+
.pipe(filter$1(event => event.data.interactionType ===
|
|
6060
|
+
InteractionType.MouseMove ||
|
|
6061
|
+
event.data.interactionType === InteractionType.Keyboard), map(event => event.data.dataPoints[chartSeries.id]));
|
|
5814
6062
|
// if there is no highlightData, or index is "-1", we'll show the last value from series (if possible)
|
|
5815
6063
|
const highlightDataPresentPredicate = (highlightData) => highlightData && highlightData.index >= 0;
|
|
5816
6064
|
return seriesHighlight$.pipe(
|
|
@@ -5931,7 +6179,8 @@ class ChartAssist {
|
|
|
5931
6179
|
configureChartEventSubscriptions(eventBus) {
|
|
5932
6180
|
const eventHandlers = {
|
|
5933
6181
|
[INTERACTION_DATA_POINTS_EVENT]: (data) => {
|
|
5934
|
-
if (data.interactionType === InteractionType.MouseMove
|
|
6182
|
+
if (data.interactionType === InteractionType.MouseMove ||
|
|
6183
|
+
data.interactionType === InteractionType.Keyboard) {
|
|
5935
6184
|
this.highlightedDataPoints = Object.assign({}, data.dataPoints);
|
|
5936
6185
|
}
|
|
5937
6186
|
},
|
|
@@ -13124,9 +13373,15 @@ function stackedPercentageAreaPreprocessor(chartSeriesSet, isVisible) {
|
|
|
13124
13373
|
const baseAccessorKey = "x";
|
|
13125
13374
|
const valueAccessorKey = "y";
|
|
13126
13375
|
for (const chartSeries of chartSeriesSet) {
|
|
13376
|
+
if (chartSeries.preprocess === false) {
|
|
13377
|
+
continue;
|
|
13378
|
+
}
|
|
13127
13379
|
calculateDomainValueCombinedTotals(baseAccessorKey, valueAccessorKey, chartSeries, isVisible, domainValueCombinedTotals);
|
|
13128
13380
|
}
|
|
13129
13381
|
for (const chartSeries of chartSeriesSet) {
|
|
13382
|
+
if (chartSeries.preprocess === false) {
|
|
13383
|
+
continue;
|
|
13384
|
+
}
|
|
13130
13385
|
applyStackMetadata(baseAccessorKey, valueAccessorKey, chartSeries, isVisible, domainValueStacks, domainValueCombinedTotals);
|
|
13131
13386
|
}
|
|
13132
13387
|
return chartSeriesSet;
|