Liferay.Loader.define("data-engine-js-components-web@1.0.55/js/custom/form-report/components/chart/bar/SimpleBarChart",["module","exports","require","liferay!frontend-js-react-web$react","frontend-js-recharts$recharts","../../../utils/colors","../../../utils/ellipsize","../TooltipContent"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({data:t,height:a,totalEntries:l,width:c}){const[u,p]=(0,r.useState)(null);return r.default.createElement("div",{className:"custom-chart-size simple-bar-chart"},r.default.createElement(n.ResponsiveContainer,{height:a||"99%",width:c||"99%"},r.default.createElement(n.BarChart,{data:t,layout:"vertical",margin:{bottom:20,left:20,right:20,top:20}},r.default.createElement(n.XAxis,{axisLine:{stroke:s},tick:{fontSize:14},tickLine:!1,type:"number"}),r.default.createElement(n.YAxis,{dataKey:"label",stroke:e,tick:({payload:e,x:t,y:a})=>r.default.createElement("g",{transform:"translate(".concat(t,",").concat(a,")")},r.default.createElement("text",{className:"".concat(null!==u&&u!==e.index?"dim":""),x:-162},"".concat(e.value.replace(/\s/g,"").length>24?(0,o.default)(e.value,24):e.value))),tickLine:!1,tickMargin:16,type:"category",width:214}),r.default.createElement(n.Tooltip,{content:r.default.createElement(i.default,{showBullet:!1,showHeader:!1,totalEntries:l}),cursor:{fill:"transparent"}}),r.default.createElement(n.Bar,{barCategoryGap:30,barGap:5,dataKey:"count",fill:f,onMouseOut:()=>{p(null)},onMouseOver:(e,t)=>(e=>{p(e)})(t)},t.map(((e,t)=>r.default.createElement(n.Cell,{fillOpacity:null!=u&&u!==t?".5":1,key:"cell-".concat(t)}))),r.default.createElement(n.LabelList,{dataKey:"count",fill:d,fontSize:14,offset:16,position:"insideRight"})))))};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var l=r?Object.getOwnPropertyDescriptor(e,n):null;l&&(l.get||l.set)?Object.defineProperty(a,n,l):a[n]=e[n]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react")),n=a("frontend-js-recharts$recharts"),l=a("../../../utils/colors"),o=c(a("../../../utils/ellipsize")),i=c(a("../TooltipContent"));function c(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}const{blueDark:e,gray:s,lightBlue:f,white:d}=l.NAMED_COLORS}}));
//# sourceMappingURL=SimpleBarChart.js.map