@carto/airship-components
Advanced tools
Comparing version 2.3.3 to 2.3.4
@@ -6,2 +6,13 @@ # Change Log | ||
## [2.3.4](https://github.com/CartoDB/airship/compare/v2.3.3...v2.3.4) (2020-05-29) | ||
### Bug Fixes | ||
* Return to SI format for values using precision higher than 3 and values higher than 999 ([#695](https://github.com/CartoDB/airship/issues/695)) ([392b960](https://github.com/CartoDB/airship/commit/392b960b90209659c93627a0632627d3533edafb)) | ||
## [2.3.3](https://github.com/CartoDB/airship/compare/v2.3.2...v2.3.3) (2020-05-22) | ||
@@ -8,0 +19,0 @@ |
@@ -1,1 +0,1 @@ | ||
import{p as e,b as a}from"./p-3fce0d94.js";e().then(e=>a([["p-tp6fmozb",[[0,"as-time-series-widget",{heading:[1],description:[1],showHeader:[4,"show-header"],showClear:[4,"show-clear"],disableInteractivity:[4,"disable-interactivity"],data:[16],backgroundData:[16],color:[1],unselectedColor:[1,"unselected-color"],colorRange:[16],tooltipFormatter:[16],xLabel:[1,"x-label"],yLabel:[1,"y-label"],isLoading:[4,"is-loading"],error:[1],errorDescription:[1,"error-description"],noDataHeaderMessage:[1,"no-data-header-message"],noDataBodyMessage:[1,"no-data-body-message"],responsive:[4],progress:[2],playing:[4],animated:[516],timeFormat:[1,"time-format"],timeFormatLocale:[16],clearText:[1,"clear-text"],range:[16],disableAnimation:[4,"disable-animation"],xAxisOptions:[16],yAxisOptions:[16],defaultFormatter:[64],getSelection:[64],setSelection:[64],clearSelection:[64],xFormatter:[64]}]]],["p-sjil3rso",[[0,"as-category-widget",{categories:[16],defaultBarColor:[1,"default-bar-color"],description:[1],disableInteractivity:[4,"disable-interactivity"],valueFormatter:[16],heading:[1],showClearButton:[4,"show-clear-button"],showHeader:[4,"show-header"],useTotalPercentage:[4,"use-total-percentage"],visibleCategories:[2,"visible-categories"],isLoading:[4,"is-loading"],error:[1],errorDescription:[1,"error-description"],noDataHeaderMessage:[1,"no-data-header-message"],noDataBodyMessage:[1,"no-data-body-message"],selectedCategories:[32],_firstDataSupplied:[32],getSelectedCategories:[64],clearSelection:[64]}]]],["p-j5r7brkb",[[0,"as-animation-controls-widget",{progress:[2],min:[2],max:[2],duration:[2],progressValue:[8,"progress-value"],isLoading:[4,"is-loading"],showThumb:[4,"show-thumb"],showThumbCaption:[4,"show-thumb-caption"],playing:[4],heading:[1],description:[1],showHeader:[4,"show-header"],noDataHeaderMessage:[1,"no-data-header-message"],noDataBodyMessage:[1,"no-data-body-message"],error:[1],errorDescription:[1,"error-description"]}]]],["p-tx6mgbbg",[[0,"as-legend-color-bins",{data:[16],orientation:[1],width:[2]}]]],["p-bncvojxb",[[0,"as-legend-color-bins-line",{data:[16],orientation:[1],width:[2]}]]],["p-m9kpymmu",[[0,"as-legend-color-bins-point",{data:[16],orientation:[1],width:[2]}]]],["p-zaqjpgjv",[[0,"as-legend-color-category",{data:[16],orientation:[1],width:[2]}]]],["p-vmqborz1",[[0,"as-legend-color-category-line",{data:[16],orientation:[1],width:[2]}]]],["p-hu5iuyzj",[[0,"as-legend-color-category-point",{data:[16],orientation:[1],width:[2]}]]],["p-srdz959s",[[0,"as-legend-color-category-polygon",{data:[16],orientation:[1],width:[2]}]]],["p-fdhrepn6",[[0,"as-legend-color-continuous-line",{data:[16],orientation:[1],width:[2]}]]],["p-hzaqqzl4",[[0,"as-legend-color-continuous-point",{data:[16],orientation:[1],width:[2]}]]],["p-zplx6tqw",[[0,"as-stacked-bar-widget",{heading:[1],description:[1],showLegend:[4,"show-legend"],data:[16],metadata:[16],isLoading:[4,"is-loading"],error:[1],errorDescription:[1,"error-description"],noDataHeaderMessage:[1,"no-data-header-message"],noDataBodyMessage:[1,"no-data-body-message"],responsive:[4],mouseOver:[16],mouseLeave:[16],formatFn:[16]}]]],["p-nxejkecw",[[0,"as-legend-size-bins",{data:[16],orientation:[1],width:[2]}]]],["p-0pmyhtll",[[0,"as-legend-size-category",{data:[16],orientation:[1],width:[2]}]]],["p-bjiytqf8",[[0,"as-legend-size-continuous",{data:[16],orientation:[1],scale:[2]}]]],["p-rqk7z6zs",[[4,"as-layer-selector",{layers:[16]},[[0,"onToggleCheckbox","onToggleCheckbox"]]]]],["p-lfavpt1m",[[4,"as-legend",{loading:[4],heading:[1],description:[1]}]]],["p-rszltsl4",[[0,"as-legend-size-category-point",{data:[16],orientation:[1],width:[2]}]]],["p-pxxomfgi",[[0,"as-dropdown",{options:[16],selectedOption:[1025,"selected-option"],defaultText:[1,"default-text"],showClearButton:[4,"show-clear-button"],onClickOutside:[16],isOpen:[32],selectedOptionObject:[32],closeList:[64]}]]],["p-aqe7oisu",[[4,"as-infowindow",{src:[1]}]]],["p-fmbijdih",[[4,"as-responsive-content",{sections:[32],getSections:[64],setVisible:[64]}]]],["p-inhlwxyy",[[0,"as-switch",{checked:[1540],disabled:[516],label:[1],name:[513]}]]],["p-x8tgl9ih",[[4,"as-tabs",{activeTab:[1026,"active-tab"],xl:[4]}]]],["p-v7jbbvtl",[[4,"as-toolbar"]]],["p-agvz78lg",[[0,"as-y-axis",{from:[2],to:[2],responsive:[4]}]]],["p-mxshr8eo",[[0,"as-histogram-widget",{heading:[1],description:[1],showHeader:[4,"show-header"],showClear:[4,"show-clear"],disableInteractivity:[4,"disable-interactivity"],data:[16],backgroundData:[16],color:[1],unselectedColor:[1,"unselected-color"],colorRange:[16],tooltipFormatter:[16],xLabel:[1,"x-label"],yLabel:[1,"y-label"],isLoading:[4,"is-loading"],error:[1],errorDescription:[1,"error-description"],noDataHeaderMessage:[1,"no-data-header-message"],noDataBodyMessage:[1,"no-data-body-message"],responsive:[4],axisFormatter:[16],clearText:[1,"clear-text"],selectedFormatter:[16],range:[16],disableAnimation:[4,"disable-animation"],xAxisOptions:[16],yAxisOptions:[16],tooltip:[32],_firstDataSupplied:[32],selectionEmpty:[32],selectionFooter:[32],isCategoricalData:[32],defaultFormatter:[64],getSelection:[64],setSelection:[64],clearSelection:[64],xFormatter:[64]}]]],["p-k61c9u14",[[4,"as-category-widget-placeholder"]]],["p-u1zm1tsy",[[0,"as-range-slider",{value:[2],range:[16],minValue:[2,"min-value"],maxValue:[2,"max-value"],step:[2],disabled:[4],draggable:[4],isDraggable:[4,"is-draggable"],showThumb:[4,"show-thumb"],showThumbCaption:[4,"show-thumb-caption"],formatValue:[16],thumbs:[32],areLabelsColliding:[32],isLeftLabelOverflowing:[32],isRightLabelOverflowing:[32]}]]],["p-uvs9n2mo",[[4,"as-layer-selector-slot",{layer:[8],index:[2],visible:[32]}]]],["p-ib5sztmd",[[0,"as-legend-color-bins-polygon",{data:[16],orientation:[1]}]]],["p-jeqm2pjf",[[0,"as-legend-color-continuous-polygon",{data:[16],orientation:[1]}]]],["p-jjbwoy6i",[[0,"as-legend-color-continuous",{data:[16],orientation:[1],width:[2]}]]],["p-rhaynb3z",[[0,"as-legend-size-bins-line",{data:[16],orientation:[1],width:[2]}]]],["p-43siwh6g",[[0,"as-legend-size-category-line",{data:[16],orientation:[1],aligned:[4],factor:[2],minWidth:[2,"min-width"]}]]],["p-knbpcnxw",[[0,"as-widget-legend",{data:[16]}]]],["p-zjnwomh2",[[0,"as-placeholder-list"]]],["p-r2ydtmdv",[[0,"as-legend-size-continuous-line",{data:[16],orientation:[1],size:[2],leadingLineStrokeWidth:[2,"leading-line-stroke-width"],textLineHeight:[2,"text-line-height"],xMarginFactor:[2,"x-margin-factor"],yMarginFactor:[2,"y-margin-factor"],width:[2],rSize:[32]}],[0,"as-legend-size-continuous-point",{data:[16],orientation:[1],scale:[2]}]]],["p-oi1cfmnf",[[0,"as-legend-size-bins-point",{data:[16],orientation:[1],width:[2]}]]],["p-i3o0edci",[[0,"as-range-slider-bar",{rangeStartPercentage:[1026,"range-start-percentage"],rangeEndPercentage:[1026,"range-end-percentage"],stepPercentage:[2,"step-percentage"],isDraggable:[4,"is-draggable"],disabled:[4]},[[1,"mousedown","onMouseDown"],[1,"touchstart","onMouseDown"]]],[0,"as-range-slider-thumb",{percentage:[2],value:[2],valueMin:[2,"value-min"],valueMax:[2,"value-max"],disabled:[4],showCaption:[4,"show-caption"],formatValue:[16]},[[1,"mousedown","onMouseDown"],[1,"touchstart","onMouseDown"],[0,"keydown","onKeyDown"]]]]],["p-kkcpb5hh",[[4,"as-placeholder"],[0,"as-placeholder-bar",{width:[1],height:[1]}]]],["p-didkqfvj",[[4,"as-histogram-widget-placeholder"],[0,"as-placeholder-chart",{barWidth:[2,"bar-width"],elementWidth:[32]},[[9,"resize","onWindowResize"]]],[0,"as-widget-selection",{selection:[1],clearText:[1,"clear-text"],showClear:[4,"show-clear"]}]]],["p-0mbw6jzy",[[0,"as-loader"],[0,"as-widget-header",{header:[1],subheader:[1],error:[1],isEmpty:[4,"is-empty"],isLoading:[4,"is-loading"],noDataMessage:[1,"no-data-message"]}]]],["p-jsitkjfo",[[0,"as-legend-category",{data:[16],orientation:[1],width:[2]}],[0,"as-legend-category-line-entry",{label:[1],color:[1],strokeStyle:[1,"stroke-style"],width:[2],_width:[32]}],[0,"as-legend-category-point-entry",{label:[1],color:[1],strokeColor:[1,"stroke-color"],strokeStyle:[1,"stroke-style"],marker:[1],width:[2]}],[0,"as-legend-category-polygon-entry",{label:[1],color:[1],strokeColor:[1,"stroke-color"],strokeStyle:[1,"stroke-style"]}]]]],e)); | ||
import{p as e,b as a}from"./p-3fce0d94.js";e().then(e=>a([["p-tp6fmozb",[[0,"as-time-series-widget",{heading:[1],description:[1],showHeader:[4,"show-header"],showClear:[4,"show-clear"],disableInteractivity:[4,"disable-interactivity"],data:[16],backgroundData:[16],color:[1],unselectedColor:[1,"unselected-color"],colorRange:[16],tooltipFormatter:[16],xLabel:[1,"x-label"],yLabel:[1,"y-label"],isLoading:[4,"is-loading"],error:[1],errorDescription:[1,"error-description"],noDataHeaderMessage:[1,"no-data-header-message"],noDataBodyMessage:[1,"no-data-body-message"],responsive:[4],progress:[2],playing:[4],animated:[516],timeFormat:[1,"time-format"],timeFormatLocale:[16],clearText:[1,"clear-text"],range:[16],disableAnimation:[4,"disable-animation"],xAxisOptions:[16],yAxisOptions:[16],defaultFormatter:[64],getSelection:[64],setSelection:[64],clearSelection:[64],xFormatter:[64]}]]],["p-sjil3rso",[[0,"as-category-widget",{categories:[16],defaultBarColor:[1,"default-bar-color"],description:[1],disableInteractivity:[4,"disable-interactivity"],valueFormatter:[16],heading:[1],showClearButton:[4,"show-clear-button"],showHeader:[4,"show-header"],useTotalPercentage:[4,"use-total-percentage"],visibleCategories:[2,"visible-categories"],isLoading:[4,"is-loading"],error:[1],errorDescription:[1,"error-description"],noDataHeaderMessage:[1,"no-data-header-message"],noDataBodyMessage:[1,"no-data-body-message"],selectedCategories:[32],_firstDataSupplied:[32],getSelectedCategories:[64],clearSelection:[64]}]]],["p-j5r7brkb",[[0,"as-animation-controls-widget",{progress:[2],min:[2],max:[2],duration:[2],progressValue:[8,"progress-value"],isLoading:[4,"is-loading"],showThumb:[4,"show-thumb"],showThumbCaption:[4,"show-thumb-caption"],playing:[4],heading:[1],description:[1],showHeader:[4,"show-header"],noDataHeaderMessage:[1,"no-data-header-message"],noDataBodyMessage:[1,"no-data-body-message"],error:[1],errorDescription:[1,"error-description"]}]]],["p-tx6mgbbg",[[0,"as-legend-color-bins",{data:[16],orientation:[1],width:[2]}]]],["p-bncvojxb",[[0,"as-legend-color-bins-line",{data:[16],orientation:[1],width:[2]}]]],["p-m9kpymmu",[[0,"as-legend-color-bins-point",{data:[16],orientation:[1],width:[2]}]]],["p-zaqjpgjv",[[0,"as-legend-color-category",{data:[16],orientation:[1],width:[2]}]]],["p-vmqborz1",[[0,"as-legend-color-category-line",{data:[16],orientation:[1],width:[2]}]]],["p-hu5iuyzj",[[0,"as-legend-color-category-point",{data:[16],orientation:[1],width:[2]}]]],["p-srdz959s",[[0,"as-legend-color-category-polygon",{data:[16],orientation:[1],width:[2]}]]],["p-fdhrepn6",[[0,"as-legend-color-continuous-line",{data:[16],orientation:[1],width:[2]}]]],["p-hzaqqzl4",[[0,"as-legend-color-continuous-point",{data:[16],orientation:[1],width:[2]}]]],["p-zplx6tqw",[[0,"as-stacked-bar-widget",{heading:[1],description:[1],showLegend:[4,"show-legend"],data:[16],metadata:[16],isLoading:[4,"is-loading"],error:[1],errorDescription:[1,"error-description"],noDataHeaderMessage:[1,"no-data-header-message"],noDataBodyMessage:[1,"no-data-body-message"],responsive:[4],mouseOver:[16],mouseLeave:[16],formatFn:[16]}]]],["p-nxejkecw",[[0,"as-legend-size-bins",{data:[16],orientation:[1],width:[2]}]]],["p-0pmyhtll",[[0,"as-legend-size-category",{data:[16],orientation:[1],width:[2]}]]],["p-bjiytqf8",[[0,"as-legend-size-continuous",{data:[16],orientation:[1],scale:[2]}]]],["p-rqk7z6zs",[[4,"as-layer-selector",{layers:[16]},[[0,"onToggleCheckbox","onToggleCheckbox"]]]]],["p-lfavpt1m",[[4,"as-legend",{loading:[4],heading:[1],description:[1]}]]],["p-rszltsl4",[[0,"as-legend-size-category-point",{data:[16],orientation:[1],width:[2]}]]],["p-pxxomfgi",[[0,"as-dropdown",{options:[16],selectedOption:[1025,"selected-option"],defaultText:[1,"default-text"],showClearButton:[4,"show-clear-button"],onClickOutside:[16],isOpen:[32],selectedOptionObject:[32],closeList:[64]}]]],["p-aqe7oisu",[[4,"as-infowindow",{src:[1]}]]],["p-fmbijdih",[[4,"as-responsive-content",{sections:[32],getSections:[64],setVisible:[64]}]]],["p-inhlwxyy",[[0,"as-switch",{checked:[1540],disabled:[516],label:[1],name:[513]}]]],["p-x8tgl9ih",[[4,"as-tabs",{activeTab:[1026,"active-tab"],xl:[4]}]]],["p-v7jbbvtl",[[4,"as-toolbar"]]],["p-agvz78lg",[[0,"as-y-axis",{from:[2],to:[2],responsive:[4]}]]],["p-sncw1u46",[[0,"as-histogram-widget",{heading:[1],description:[1],showHeader:[4,"show-header"],showClear:[4,"show-clear"],disableInteractivity:[4,"disable-interactivity"],data:[16],backgroundData:[16],color:[1],unselectedColor:[1,"unselected-color"],colorRange:[16],tooltipFormatter:[16],xLabel:[1,"x-label"],yLabel:[1,"y-label"],isLoading:[4,"is-loading"],error:[1],errorDescription:[1,"error-description"],noDataHeaderMessage:[1,"no-data-header-message"],noDataBodyMessage:[1,"no-data-body-message"],responsive:[4],axisFormatter:[16],clearText:[1,"clear-text"],selectedFormatter:[16],range:[16],disableAnimation:[4,"disable-animation"],xAxisOptions:[16],yAxisOptions:[16],tooltip:[32],_firstDataSupplied:[32],selectionEmpty:[32],selectionFooter:[32],isCategoricalData:[32],defaultFormatter:[64],getSelection:[64],setSelection:[64],clearSelection:[64],xFormatter:[64]}]]],["p-k61c9u14",[[4,"as-category-widget-placeholder"]]],["p-u1zm1tsy",[[0,"as-range-slider",{value:[2],range:[16],minValue:[2,"min-value"],maxValue:[2,"max-value"],step:[2],disabled:[4],draggable:[4],isDraggable:[4,"is-draggable"],showThumb:[4,"show-thumb"],showThumbCaption:[4,"show-thumb-caption"],formatValue:[16],thumbs:[32],areLabelsColliding:[32],isLeftLabelOverflowing:[32],isRightLabelOverflowing:[32]}]]],["p-uvs9n2mo",[[4,"as-layer-selector-slot",{layer:[8],index:[2],visible:[32]}]]],["p-ib5sztmd",[[0,"as-legend-color-bins-polygon",{data:[16],orientation:[1]}]]],["p-jeqm2pjf",[[0,"as-legend-color-continuous-polygon",{data:[16],orientation:[1]}]]],["p-jjbwoy6i",[[0,"as-legend-color-continuous",{data:[16],orientation:[1],width:[2]}]]],["p-rhaynb3z",[[0,"as-legend-size-bins-line",{data:[16],orientation:[1],width:[2]}]]],["p-43siwh6g",[[0,"as-legend-size-category-line",{data:[16],orientation:[1],aligned:[4],factor:[2],minWidth:[2,"min-width"]}]]],["p-knbpcnxw",[[0,"as-widget-legend",{data:[16]}]]],["p-zjnwomh2",[[0,"as-placeholder-list"]]],["p-r2ydtmdv",[[0,"as-legend-size-continuous-line",{data:[16],orientation:[1],size:[2],leadingLineStrokeWidth:[2,"leading-line-stroke-width"],textLineHeight:[2,"text-line-height"],xMarginFactor:[2,"x-margin-factor"],yMarginFactor:[2,"y-margin-factor"],width:[2],rSize:[32]}],[0,"as-legend-size-continuous-point",{data:[16],orientation:[1],scale:[2]}]]],["p-oi1cfmnf",[[0,"as-legend-size-bins-point",{data:[16],orientation:[1],width:[2]}]]],["p-i3o0edci",[[0,"as-range-slider-bar",{rangeStartPercentage:[1026,"range-start-percentage"],rangeEndPercentage:[1026,"range-end-percentage"],stepPercentage:[2,"step-percentage"],isDraggable:[4,"is-draggable"],disabled:[4]},[[1,"mousedown","onMouseDown"],[1,"touchstart","onMouseDown"]]],[0,"as-range-slider-thumb",{percentage:[2],value:[2],valueMin:[2,"value-min"],valueMax:[2,"value-max"],disabled:[4],showCaption:[4,"show-caption"],formatValue:[16]},[[1,"mousedown","onMouseDown"],[1,"touchstart","onMouseDown"],[0,"keydown","onKeyDown"]]]]],["p-kkcpb5hh",[[4,"as-placeholder"],[0,"as-placeholder-bar",{width:[1],height:[1]}]]],["p-didkqfvj",[[4,"as-histogram-widget-placeholder"],[0,"as-placeholder-chart",{barWidth:[2,"bar-width"],elementWidth:[32]},[[9,"resize","onWindowResize"]]],[0,"as-widget-selection",{selection:[1],clearText:[1,"clear-text"],showClear:[4,"show-clear"]}]]],["p-0mbw6jzy",[[0,"as-loader"],[0,"as-widget-header",{header:[1],subheader:[1],error:[1],isEmpty:[4,"is-empty"],isLoading:[4,"is-loading"],noDataMessage:[1,"no-data-message"]}]]],["p-jsitkjfo",[[0,"as-legend-category",{data:[16],orientation:[1],width:[2]}],[0,"as-legend-category-line-entry",{label:[1],color:[1],strokeStyle:[1,"stroke-style"],width:[2],_width:[32]}],[0,"as-legend-category-point-entry",{label:[1],color:[1],strokeColor:[1,"stroke-color"],strokeStyle:[1,"stroke-style"],marker:[1],width:[2]}],[0,"as-legend-category-polygon-entry",{label:[1],color:[1],strokeColor:[1,"stroke-color"],strokeStyle:[1,"stroke-style"]}]]]],e)); |
@@ -1,1 +0,1 @@ | ||
System.register(["./p-634af494.system.js"],function(){"use strict";var e,a;return{setters:[function(t){e=t.p;a=t.b}],execute:function(){e().then(function(e){return a([["p-5crmwfuw.system",[[0,"as-time-series-widget",{heading:[1],description:[1],showHeader:[4,"show-header"],showClear:[4,"show-clear"],disableInteractivity:[4,"disable-interactivity"],data:[16],backgroundData:[16],color:[1],unselectedColor:[1,"unselected-color"],colorRange:[16],tooltipFormatter:[16],xLabel:[1,"x-label"],yLabel:[1,"y-label"],isLoading:[4,"is-loading"],error:[1],errorDescription:[1,"error-description"],noDataHeaderMessage:[1,"no-data-header-message"],noDataBodyMessage:[1,"no-data-body-message"],responsive:[4],progress:[2],playing:[4],animated:[516],timeFormat:[1,"time-format"],timeFormatLocale:[16],clearText:[1,"clear-text"],range:[16],disableAnimation:[4,"disable-animation"],xAxisOptions:[16],yAxisOptions:[16],defaultFormatter:[64],getSelection:[64],setSelection:[64],clearSelection:[64],xFormatter:[64]}]]],["p-3qoi2dy2.system",[[0,"as-category-widget",{categories:[16],defaultBarColor:[1,"default-bar-color"],description:[1],disableInteractivity:[4,"disable-interactivity"],valueFormatter:[16],heading:[1],showClearButton:[4,"show-clear-button"],showHeader:[4,"show-header"],useTotalPercentage:[4,"use-total-percentage"],visibleCategories:[2,"visible-categories"],isLoading:[4,"is-loading"],error:[1],errorDescription:[1,"error-description"],noDataHeaderMessage:[1,"no-data-header-message"],noDataBodyMessage:[1,"no-data-body-message"],selectedCategories:[32],_firstDataSupplied:[32],getSelectedCategories:[64],clearSelection:[64]}]]],["p-pk1kn3x4.system",[[0,"as-animation-controls-widget",{progress:[2],min:[2],max:[2],duration:[2],progressValue:[8,"progress-value"],isLoading:[4,"is-loading"],showThumb:[4,"show-thumb"],showThumbCaption:[4,"show-thumb-caption"],playing:[4],heading:[1],description:[1],showHeader:[4,"show-header"],noDataHeaderMessage:[1,"no-data-header-message"],noDataBodyMessage:[1,"no-data-body-message"],error:[1],errorDescription:[1,"error-description"]}]]],["p-ykkqckka.system",[[0,"as-legend-color-bins",{data:[16],orientation:[1],width:[2]}]]],["p-xanqj1ac.system",[[0,"as-legend-color-bins-line",{data:[16],orientation:[1],width:[2]}]]],["p-pituu9ee.system",[[0,"as-legend-color-bins-point",{data:[16],orientation:[1],width:[2]}]]],["p-yddxzlcz.system",[[0,"as-legend-color-category",{data:[16],orientation:[1],width:[2]}]]],["p-e2cdib3i.system",[[0,"as-legend-color-category-line",{data:[16],orientation:[1],width:[2]}]]],["p-shhj6rvq.system",[[0,"as-legend-color-category-point",{data:[16],orientation:[1],width:[2]}]]],["p-2ylksuk7.system",[[0,"as-legend-color-category-polygon",{data:[16],orientation:[1],width:[2]}]]],["p-cvjls6uc.system",[[0,"as-legend-color-continuous-line",{data:[16],orientation:[1],width:[2]}]]],["p-frl2gjax.system",[[0,"as-legend-color-continuous-point",{data:[16],orientation:[1],width:[2]}]]],["p-j0t4ovlv.system",[[0,"as-stacked-bar-widget",{heading:[1],description:[1],showLegend:[4,"show-legend"],data:[16],metadata:[16],isLoading:[4,"is-loading"],error:[1],errorDescription:[1,"error-description"],noDataHeaderMessage:[1,"no-data-header-message"],noDataBodyMessage:[1,"no-data-body-message"],responsive:[4],mouseOver:[16],mouseLeave:[16],formatFn:[16]}]]],["p-oloaqowq.system",[[0,"as-legend-size-bins",{data:[16],orientation:[1],width:[2]}]]],["p-spadyexy.system",[[0,"as-legend-size-category",{data:[16],orientation:[1],width:[2]}]]],["p-8zglar8y.system",[[0,"as-legend-size-continuous",{data:[16],orientation:[1],scale:[2]}]]],["p-lwgxhtbb.system",[[4,"as-layer-selector",{layers:[16]},[[0,"onToggleCheckbox","onToggleCheckbox"]]]]],["p-rmbi9dlo.system",[[4,"as-legend",{loading:[4],heading:[1],description:[1]}]]],["p-earkp7ac.system",[[0,"as-legend-size-category-point",{data:[16],orientation:[1],width:[2]}]]],["p-xsfrta4t.system",[[0,"as-dropdown",{options:[16],selectedOption:[1025,"selected-option"],defaultText:[1,"default-text"],showClearButton:[4,"show-clear-button"],onClickOutside:[16],isOpen:[32],selectedOptionObject:[32],closeList:[64]}]]],["p-2a2wgo83.system",[[4,"as-infowindow",{src:[1]}]]],["p-hhxvyezm.system",[[4,"as-responsive-content",{sections:[32],getSections:[64],setVisible:[64]}]]],["p-gjfgcscg.system",[[0,"as-switch",{checked:[1540],disabled:[516],label:[1],name:[513]}]]],["p-eqgcnbnh.system",[[4,"as-tabs",{activeTab:[1026,"active-tab"],xl:[4]}]]],["p-byae864q.system",[[4,"as-toolbar"]]],["p-fkogpgvo.system",[[0,"as-y-axis",{from:[2],to:[2],responsive:[4]}]]],["p-btcxgxsu.system",[[0,"as-histogram-widget",{heading:[1],description:[1],showHeader:[4,"show-header"],showClear:[4,"show-clear"],disableInteractivity:[4,"disable-interactivity"],data:[16],backgroundData:[16],color:[1],unselectedColor:[1,"unselected-color"],colorRange:[16],tooltipFormatter:[16],xLabel:[1,"x-label"],yLabel:[1,"y-label"],isLoading:[4,"is-loading"],error:[1],errorDescription:[1,"error-description"],noDataHeaderMessage:[1,"no-data-header-message"],noDataBodyMessage:[1,"no-data-body-message"],responsive:[4],axisFormatter:[16],clearText:[1,"clear-text"],selectedFormatter:[16],range:[16],disableAnimation:[4,"disable-animation"],xAxisOptions:[16],yAxisOptions:[16],tooltip:[32],_firstDataSupplied:[32],selectionEmpty:[32],selectionFooter:[32],isCategoricalData:[32],defaultFormatter:[64],getSelection:[64],setSelection:[64],clearSelection:[64],xFormatter:[64]}]]],["p-wni5cgjb.system",[[4,"as-category-widget-placeholder"]]],["p-ihb6fyw0.system",[[0,"as-range-slider",{value:[2],range:[16],minValue:[2,"min-value"],maxValue:[2,"max-value"],step:[2],disabled:[4],draggable:[4],isDraggable:[4,"is-draggable"],showThumb:[4,"show-thumb"],showThumbCaption:[4,"show-thumb-caption"],formatValue:[16],thumbs:[32],areLabelsColliding:[32],isLeftLabelOverflowing:[32],isRightLabelOverflowing:[32]}]]],["p-sr5vhmqe.system",[[4,"as-layer-selector-slot",{layer:[8],index:[2],visible:[32]}]]],["p-ikblq1ej.system",[[0,"as-legend-color-bins-polygon",{data:[16],orientation:[1]}]]],["p-bsotwq0g.system",[[0,"as-legend-color-continuous-polygon",{data:[16],orientation:[1]}]]],["p-o6bwakdf.system",[[0,"as-legend-color-continuous",{data:[16],orientation:[1],width:[2]}]]],["p-psemxjwi.system",[[0,"as-legend-size-bins-line",{data:[16],orientation:[1],width:[2]}]]],["p-vggsvcbf.system",[[0,"as-legend-size-category-line",{data:[16],orientation:[1],aligned:[4],factor:[2],minWidth:[2,"min-width"]}]]],["p-qnlovpg7.system",[[0,"as-widget-legend",{data:[16]}]]],["p-p7azfgcv.system",[[0,"as-placeholder-list"]]],["p-hlfxt9gp.system",[[0,"as-legend-size-continuous-line",{data:[16],orientation:[1],size:[2],leadingLineStrokeWidth:[2,"leading-line-stroke-width"],textLineHeight:[2,"text-line-height"],xMarginFactor:[2,"x-margin-factor"],yMarginFactor:[2,"y-margin-factor"],width:[2],rSize:[32]}],[0,"as-legend-size-continuous-point",{data:[16],orientation:[1],scale:[2]}]]],["p-ptmy4w6w.system",[[0,"as-legend-size-bins-point",{data:[16],orientation:[1],width:[2]}]]],["p-usv3p8jy.system",[[0,"as-range-slider-bar",{rangeStartPercentage:[1026,"range-start-percentage"],rangeEndPercentage:[1026,"range-end-percentage"],stepPercentage:[2,"step-percentage"],isDraggable:[4,"is-draggable"],disabled:[4]},[[1,"mousedown","onMouseDown"],[1,"touchstart","onMouseDown"]]],[0,"as-range-slider-thumb",{percentage:[2],value:[2],valueMin:[2,"value-min"],valueMax:[2,"value-max"],disabled:[4],showCaption:[4,"show-caption"],formatValue:[16]},[[1,"mousedown","onMouseDown"],[1,"touchstart","onMouseDown"],[0,"keydown","onKeyDown"]]]]],["p-fvyynkzl.system",[[4,"as-placeholder"],[0,"as-placeholder-bar",{width:[1],height:[1]}]]],["p-a52n5axp.system",[[4,"as-histogram-widget-placeholder"],[0,"as-placeholder-chart",{barWidth:[2,"bar-width"],elementWidth:[32]},[[9,"resize","onWindowResize"]]],[0,"as-widget-selection",{selection:[1],clearText:[1,"clear-text"],showClear:[4,"show-clear"]}]]],["p-f3o7ivgd.system",[[0,"as-loader"],[0,"as-widget-header",{header:[1],subheader:[1],error:[1],isEmpty:[4,"is-empty"],isLoading:[4,"is-loading"],noDataMessage:[1,"no-data-message"]}]]],["p-mqquh4mn.system",[[0,"as-legend-category",{data:[16],orientation:[1],width:[2]}],[0,"as-legend-category-line-entry",{label:[1],color:[1],strokeStyle:[1,"stroke-style"],width:[2],_width:[32]}],[0,"as-legend-category-point-entry",{label:[1],color:[1],strokeColor:[1,"stroke-color"],strokeStyle:[1,"stroke-style"],marker:[1],width:[2]}],[0,"as-legend-category-polygon-entry",{label:[1],color:[1],strokeColor:[1,"stroke-color"],strokeStyle:[1,"stroke-style"]}]]]],e)})}}}); | ||
System.register(["./p-634af494.system.js"],function(){"use strict";var e,a;return{setters:[function(t){e=t.p;a=t.b}],execute:function(){e().then(function(e){return a([["p-5crmwfuw.system",[[0,"as-time-series-widget",{heading:[1],description:[1],showHeader:[4,"show-header"],showClear:[4,"show-clear"],disableInteractivity:[4,"disable-interactivity"],data:[16],backgroundData:[16],color:[1],unselectedColor:[1,"unselected-color"],colorRange:[16],tooltipFormatter:[16],xLabel:[1,"x-label"],yLabel:[1,"y-label"],isLoading:[4,"is-loading"],error:[1],errorDescription:[1,"error-description"],noDataHeaderMessage:[1,"no-data-header-message"],noDataBodyMessage:[1,"no-data-body-message"],responsive:[4],progress:[2],playing:[4],animated:[516],timeFormat:[1,"time-format"],timeFormatLocale:[16],clearText:[1,"clear-text"],range:[16],disableAnimation:[4,"disable-animation"],xAxisOptions:[16],yAxisOptions:[16],defaultFormatter:[64],getSelection:[64],setSelection:[64],clearSelection:[64],xFormatter:[64]}]]],["p-3qoi2dy2.system",[[0,"as-category-widget",{categories:[16],defaultBarColor:[1,"default-bar-color"],description:[1],disableInteractivity:[4,"disable-interactivity"],valueFormatter:[16],heading:[1],showClearButton:[4,"show-clear-button"],showHeader:[4,"show-header"],useTotalPercentage:[4,"use-total-percentage"],visibleCategories:[2,"visible-categories"],isLoading:[4,"is-loading"],error:[1],errorDescription:[1,"error-description"],noDataHeaderMessage:[1,"no-data-header-message"],noDataBodyMessage:[1,"no-data-body-message"],selectedCategories:[32],_firstDataSupplied:[32],getSelectedCategories:[64],clearSelection:[64]}]]],["p-pk1kn3x4.system",[[0,"as-animation-controls-widget",{progress:[2],min:[2],max:[2],duration:[2],progressValue:[8,"progress-value"],isLoading:[4,"is-loading"],showThumb:[4,"show-thumb"],showThumbCaption:[4,"show-thumb-caption"],playing:[4],heading:[1],description:[1],showHeader:[4,"show-header"],noDataHeaderMessage:[1,"no-data-header-message"],noDataBodyMessage:[1,"no-data-body-message"],error:[1],errorDescription:[1,"error-description"]}]]],["p-ykkqckka.system",[[0,"as-legend-color-bins",{data:[16],orientation:[1],width:[2]}]]],["p-xanqj1ac.system",[[0,"as-legend-color-bins-line",{data:[16],orientation:[1],width:[2]}]]],["p-pituu9ee.system",[[0,"as-legend-color-bins-point",{data:[16],orientation:[1],width:[2]}]]],["p-yddxzlcz.system",[[0,"as-legend-color-category",{data:[16],orientation:[1],width:[2]}]]],["p-e2cdib3i.system",[[0,"as-legend-color-category-line",{data:[16],orientation:[1],width:[2]}]]],["p-shhj6rvq.system",[[0,"as-legend-color-category-point",{data:[16],orientation:[1],width:[2]}]]],["p-2ylksuk7.system",[[0,"as-legend-color-category-polygon",{data:[16],orientation:[1],width:[2]}]]],["p-cvjls6uc.system",[[0,"as-legend-color-continuous-line",{data:[16],orientation:[1],width:[2]}]]],["p-frl2gjax.system",[[0,"as-legend-color-continuous-point",{data:[16],orientation:[1],width:[2]}]]],["p-j0t4ovlv.system",[[0,"as-stacked-bar-widget",{heading:[1],description:[1],showLegend:[4,"show-legend"],data:[16],metadata:[16],isLoading:[4,"is-loading"],error:[1],errorDescription:[1,"error-description"],noDataHeaderMessage:[1,"no-data-header-message"],noDataBodyMessage:[1,"no-data-body-message"],responsive:[4],mouseOver:[16],mouseLeave:[16],formatFn:[16]}]]],["p-oloaqowq.system",[[0,"as-legend-size-bins",{data:[16],orientation:[1],width:[2]}]]],["p-spadyexy.system",[[0,"as-legend-size-category",{data:[16],orientation:[1],width:[2]}]]],["p-8zglar8y.system",[[0,"as-legend-size-continuous",{data:[16],orientation:[1],scale:[2]}]]],["p-lwgxhtbb.system",[[4,"as-layer-selector",{layers:[16]},[[0,"onToggleCheckbox","onToggleCheckbox"]]]]],["p-rmbi9dlo.system",[[4,"as-legend",{loading:[4],heading:[1],description:[1]}]]],["p-earkp7ac.system",[[0,"as-legend-size-category-point",{data:[16],orientation:[1],width:[2]}]]],["p-xsfrta4t.system",[[0,"as-dropdown",{options:[16],selectedOption:[1025,"selected-option"],defaultText:[1,"default-text"],showClearButton:[4,"show-clear-button"],onClickOutside:[16],isOpen:[32],selectedOptionObject:[32],closeList:[64]}]]],["p-2a2wgo83.system",[[4,"as-infowindow",{src:[1]}]]],["p-hhxvyezm.system",[[4,"as-responsive-content",{sections:[32],getSections:[64],setVisible:[64]}]]],["p-gjfgcscg.system",[[0,"as-switch",{checked:[1540],disabled:[516],label:[1],name:[513]}]]],["p-eqgcnbnh.system",[[4,"as-tabs",{activeTab:[1026,"active-tab"],xl:[4]}]]],["p-byae864q.system",[[4,"as-toolbar"]]],["p-fkogpgvo.system",[[0,"as-y-axis",{from:[2],to:[2],responsive:[4]}]]],["p-e7dfcu74.system",[[0,"as-histogram-widget",{heading:[1],description:[1],showHeader:[4,"show-header"],showClear:[4,"show-clear"],disableInteractivity:[4,"disable-interactivity"],data:[16],backgroundData:[16],color:[1],unselectedColor:[1,"unselected-color"],colorRange:[16],tooltipFormatter:[16],xLabel:[1,"x-label"],yLabel:[1,"y-label"],isLoading:[4,"is-loading"],error:[1],errorDescription:[1,"error-description"],noDataHeaderMessage:[1,"no-data-header-message"],noDataBodyMessage:[1,"no-data-body-message"],responsive:[4],axisFormatter:[16],clearText:[1,"clear-text"],selectedFormatter:[16],range:[16],disableAnimation:[4,"disable-animation"],xAxisOptions:[16],yAxisOptions:[16],tooltip:[32],_firstDataSupplied:[32],selectionEmpty:[32],selectionFooter:[32],isCategoricalData:[32],defaultFormatter:[64],getSelection:[64],setSelection:[64],clearSelection:[64],xFormatter:[64]}]]],["p-wni5cgjb.system",[[4,"as-category-widget-placeholder"]]],["p-ihb6fyw0.system",[[0,"as-range-slider",{value:[2],range:[16],minValue:[2,"min-value"],maxValue:[2,"max-value"],step:[2],disabled:[4],draggable:[4],isDraggable:[4,"is-draggable"],showThumb:[4,"show-thumb"],showThumbCaption:[4,"show-thumb-caption"],formatValue:[16],thumbs:[32],areLabelsColliding:[32],isLeftLabelOverflowing:[32],isRightLabelOverflowing:[32]}]]],["p-sr5vhmqe.system",[[4,"as-layer-selector-slot",{layer:[8],index:[2],visible:[32]}]]],["p-ikblq1ej.system",[[0,"as-legend-color-bins-polygon",{data:[16],orientation:[1]}]]],["p-bsotwq0g.system",[[0,"as-legend-color-continuous-polygon",{data:[16],orientation:[1]}]]],["p-o6bwakdf.system",[[0,"as-legend-color-continuous",{data:[16],orientation:[1],width:[2]}]]],["p-psemxjwi.system",[[0,"as-legend-size-bins-line",{data:[16],orientation:[1],width:[2]}]]],["p-vggsvcbf.system",[[0,"as-legend-size-category-line",{data:[16],orientation:[1],aligned:[4],factor:[2],minWidth:[2,"min-width"]}]]],["p-qnlovpg7.system",[[0,"as-widget-legend",{data:[16]}]]],["p-p7azfgcv.system",[[0,"as-placeholder-list"]]],["p-hlfxt9gp.system",[[0,"as-legend-size-continuous-line",{data:[16],orientation:[1],size:[2],leadingLineStrokeWidth:[2,"leading-line-stroke-width"],textLineHeight:[2,"text-line-height"],xMarginFactor:[2,"x-margin-factor"],yMarginFactor:[2,"y-margin-factor"],width:[2],rSize:[32]}],[0,"as-legend-size-continuous-point",{data:[16],orientation:[1],scale:[2]}]]],["p-ptmy4w6w.system",[[0,"as-legend-size-bins-point",{data:[16],orientation:[1],width:[2]}]]],["p-usv3p8jy.system",[[0,"as-range-slider-bar",{rangeStartPercentage:[1026,"range-start-percentage"],rangeEndPercentage:[1026,"range-end-percentage"],stepPercentage:[2,"step-percentage"],isDraggable:[4,"is-draggable"],disabled:[4]},[[1,"mousedown","onMouseDown"],[1,"touchstart","onMouseDown"]]],[0,"as-range-slider-thumb",{percentage:[2],value:[2],valueMin:[2,"value-min"],valueMax:[2,"value-max"],disabled:[4],showCaption:[4,"show-caption"],formatValue:[16]},[[1,"mousedown","onMouseDown"],[1,"touchstart","onMouseDown"],[0,"keydown","onKeyDown"]]]]],["p-fvyynkzl.system",[[4,"as-placeholder"],[0,"as-placeholder-bar",{width:[1],height:[1]}]]],["p-a52n5axp.system",[[4,"as-histogram-widget-placeholder"],[0,"as-placeholder-chart",{barWidth:[2,"bar-width"],elementWidth:[32]},[[9,"resize","onWindowResize"]]],[0,"as-widget-selection",{selection:[1],clearText:[1,"clear-text"],showClear:[4,"show-clear"]}]]],["p-f3o7ivgd.system",[[0,"as-loader"],[0,"as-widget-header",{header:[1],subheader:[1],error:[1],isEmpty:[4,"is-empty"],isLoading:[4,"is-loading"],noDataMessage:[1,"no-data-message"]}]]],["p-mqquh4mn.system",[[0,"as-legend-category",{data:[16],orientation:[1],width:[2]}],[0,"as-legend-category-line-entry",{label:[1],color:[1],strokeStyle:[1,"stroke-style"],width:[2],_width:[32]}],[0,"as-legend-category-point-entry",{label:[1],color:[1],strokeColor:[1,"stroke-color"],strokeStyle:[1,"stroke-style"],marker:[1],width:[2]}],[0,"as-legend-category-polygon-entry",{label:[1],color:[1],strokeColor:[1,"stroke-color"],strokeStyle:[1,"stroke-style"]}]]]],e)})}}}); |
{ | ||
"entries": [ | ||
"components/as-animation-controls-widget/as-animation-controls-widget.js", | ||
"components/as-dropdown/as-dropdown.js", | ||
"components/as-infowindow/as-infowindow.js", | ||
@@ -12,7 +14,14 @@ "components/as-layer-selector-slot/as-layer-selector-slot.js", | ||
"components/as-placeholder/placeholder/as-placeholder.js", | ||
"components/as-range-slider/thumb/as-range-slider-thumb.js", | ||
"components/as-range-slider/track/as-range-slider-bar.js", | ||
"components/as-responsive-content/as-responsive-content.js", | ||
"components/as-stacked-bar-widget/as-stacked-bar-widget.js", | ||
"components/as-switch/as-switch.js", | ||
"components/as-tabs/as-tabs.js", | ||
"components/as-toolbar/as-toolbar.js", | ||
"components/common/as-loader/as-loader.js", | ||
"components/as-toolbar/as-toolbar.js", | ||
"components/common/as-widget-header/as-widget-header.js", | ||
"components/common/as-widget-legend/as-widget-legend.js", | ||
"components/legends/as-legend-category-polygon-entry/as-legend-category-polygon-entry.js", | ||
"components/common/as-widget-selection/as-widget-selection.js", | ||
"components/common/y-axis/as-y-axis.js", | ||
"components/legends/as-legend-category/as-legend-category.js", | ||
@@ -27,31 +36,22 @@ "components/legends/as-legend-color-bins-line/as-legend-color-bins-line.js", | ||
"components/legends/as-legend-color-category/as-legend-color-category.js", | ||
"components/legends/as-legend-color-continuous-line/as-legend-color-continuous-line.js", | ||
"components/legends/as-legend-color-continuous-point/as-legend-color-continuous-point.js", | ||
"components/legends/as-legend-color-continuous-polygon/as-legend-color-continuous-polygon.js", | ||
"components/legends/as-legend-color-continuous-line/as-legend-color-continuous-line.js", | ||
"components/legends/as-legend-color-continuous/as-legend-color-continuous.js", | ||
"components/legends/as-legend-size-bins-line/as-legend-size-bins-line.js", | ||
"components/legends/as-legend-size-bins-point/as-legend-size-bins-point.js", | ||
"components/legends/as-legend-size-bins/as-legend-size-bins.js", | ||
"components/legends/as-legend-size-category-line/as-legend-size-category-line.js", | ||
"components/legends/as-legend-size-category-point/as-legend-size-category-point.js", | ||
"components/legends/as-legend-size-category/as-legend-size-category.js", | ||
"components/legends/as-legend-size-continuous-line/as-legend-size-continuous-line.js", | ||
"components/legends/as-legend-size-continuous-point/as-legend-size-continuous-point.js", | ||
"components/legends/as-legend-size-continuous/as-legend-size-continuous.js", | ||
"components/legends/as-legend/as-legend.js", | ||
"components/as-range-slider/track/as-range-slider-bar.js", | ||
"components/as-responsive-content/as-responsive-content.js", | ||
"components/as-switch/as-switch.js", | ||
"components/common/as-widget-header/as-widget-header.js", | ||
"components/common/as-widget-selection/as-widget-selection.js", | ||
"components/common/y-axis/as-y-axis.js", | ||
"components/legends/as-legend-category-line-entry/as-legend-category-line-entry.js", | ||
"components/legends/as-legend-category-point-entry/as-legend-category-point-entry.js", | ||
"components/legends/as-legend-size-bins-point/as-legend-size-bins-point.js", | ||
"components/legends/as-legend-size-category-line/as-legend-size-category-line.js", | ||
"components/legends/as-legend-size-continuous-point/as-legend-size-continuous-point.js", | ||
"components/as-dropdown/as-dropdown.js", | ||
"components/as-range-slider/thumb/as-range-slider-thumb.js", | ||
"components/legends/as-legend-size-continuous-line/as-legend-size-continuous-line.js", | ||
"components/as-animation-controls-widget/as-animation-controls-widget.js", | ||
"components/as-stacked-bar-widget/as-stacked-bar-widget.js", | ||
"components/as-category-widget/as-category-widget.js", | ||
"components/as-range-slider/slider/as-range-slider.js", | ||
"components/as-time-series-widget/as-time-series-widget.js", | ||
"components/legends/as-legend-category-polygon-entry/as-legend-category-polygon-entry.js", | ||
"components/legends/as-legend-category-point-entry/as-legend-category-point-entry.js", | ||
"components/legends/as-legend-category-line-entry/as-legend-category-line-entry.js", | ||
"components/as-histogram-widget/as-histogram-widget.js" | ||
@@ -58,0 +58,0 @@ ], |
@@ -6,4 +6,4 @@ import { axisBottom } from 'd3-axis'; | ||
const BAR_WIDTH_THRESHOLD = 3; | ||
const formatter = format('.3'); | ||
const decimalFormatter = format('.2'); | ||
const formatter = format('.2~s'); | ||
const decimalFormatter = format('.3~f'); | ||
export function cleanAxes(yAxisSelection) { | ||
@@ -99,4 +99,2 @@ yAxisSelection.select('.domain').remove(); | ||
let xAxis; | ||
// Get domain precision for formatter in case of numbers | ||
const domainPrecision = getDomainPrecision(domain); | ||
if (axisOptions.values || axisOptions.format) { | ||
@@ -116,3 +114,3 @@ const altScale = scaleLinear() | ||
const realValue = realScale.invert(value); | ||
return customFormatter(realValue, domainPrecision); | ||
return customFormatter(realValue); | ||
}); | ||
@@ -218,24 +216,10 @@ } | ||
} | ||
function getFloatPrecision(value) { | ||
const expValue = value.toString(); | ||
const expPos = expValue.indexOf('.'); | ||
return expPos > -1 ? expValue.length - (expPos + 1) : 0; | ||
function precisionIsMicroOrSmaller(value) { | ||
const valueStr = value.toString(); | ||
const microTest = /\.0{3}|e-[4-9]|e-[0-9]{2,}/; | ||
return microTest.test(valueStr); | ||
} | ||
function getDomainPrecision(domain) { | ||
let domainPrecision = 0; | ||
if (Number.isFinite(domain[0])) { | ||
const domainDiff = domain[domain.length - 1] - domain[0]; | ||
const domainDiffPrecision = getFloatPrecision(domainDiff); | ||
if (domainDiff > 1 && domainDiffPrecision > 1) { | ||
domainPrecision = 1; | ||
} | ||
else if (domainDiff < 1) { | ||
domainPrecision = domainDiffPrecision; | ||
} | ||
} | ||
return domainPrecision; | ||
} | ||
export function conditionalFormatter(value, domainPrecision = 0) { | ||
export function conditionalFormatter(value) { | ||
// Until we really need to use kilo or milli, we will not use SI prefixes | ||
if (value > -100 && value < 100 && domainPrecision < 4) { | ||
if (value > -1 && value < 1 && !precisionIsMicroOrSmaller(value)) { | ||
return decimalFormatter(value); | ||
@@ -242,0 +226,0 @@ } |
@@ -14,3 +14,3 @@ import { Axis } from 'd3-axis'; | ||
export declare function renderBars(data: HistogramData[], yScale: ScaleLinear<number, number>, container: SVGContainer, barsContainer: SVGGContainer, color: string, X_PADDING: number, Y_PADDING: number, disableAnimation?: boolean, className?: string): void; | ||
export declare function renderXAxis(container: SVGContainer, domain: Domain, bins: number, X_PADDING: number, Y_PADDING: number, customFormatter: (value: Date | number, domainPrecision: number) => string, axisOptions: AxisOptions): Axis<{ | ||
export declare function renderXAxis(container: SVGContainer, domain: Domain, bins: number, X_PADDING: number, Y_PADDING: number, customFormatter: (value: Date | number) => string, axisOptions: AxisOptions): Axis<{ | ||
valueOf(): number; | ||
@@ -24,3 +24,3 @@ }>; | ||
}>; | ||
export declare function conditionalFormatter(value: any, domainPrecision?: number): string; | ||
export declare function conditionalFormatter(value: any): string; | ||
declare const _default: { | ||
@@ -27,0 +27,0 @@ cleanAxes: typeof cleanAxes; |
{ | ||
"name": "@carto/airship-components", | ||
"version": "2.3.3", | ||
"version": "2.3.4", | ||
"description": "Airship is a set of tools designed to facilitate the development of location intelligence apps by offering layouts, basic patterns, templates, CSS classes, components, widgets and much more.", | ||
@@ -67,3 +67,3 @@ "module": "dist/index.mjs", | ||
}, | ||
"gitHead": "827cb6d9130318d634242acdaf7339fa0c003b0e" | ||
"gitHead": "d93e8e8c59b8cc8a1954600d3d8e08e7e3501813" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3331680
57844