cl-react-graph
Version:
2 lines • 7.03 kB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{Z3vd:function(e,a,t){"use strict";var o=t("aXB2"),n=t("k1TG"),r=t("q1tI"),i=t("iuhU"),l=t("H2TA"),c=t("ye/S"),d=t("VD++"),s=t("NqtD"),p=r.forwardRef((function(e,a){var t=e.children,l=e.classes,c=e.className,p=e.color,b=void 0===p?"default":p,m=e.component,u=void 0===m?"button":m,h=e.disabled,g=void 0!==h&&h,y=e.disableElevation,x=void 0!==y&&y,v=e.disableFocusRipple,f=void 0!==v&&v,S=e.endIcon,k=e.focusVisibleClassName,C=e.fullWidth,z=void 0!==C&&C,w=e.size,O=void 0===w?"medium":w,j=e.startIcon,E=e.type,N=void 0===E?"button":E,R=e.variant,I=void 0===R?"text":R,T=Object(o.a)(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),$=j&&r.createElement("span",{className:Object(i.a)(l.startIcon,l["iconSize".concat(Object(s.a)(O))])},j),V=S&&r.createElement("span",{className:Object(i.a)(l.endIcon,l["iconSize".concat(Object(s.a)(O))])},S);return r.createElement(d.a,Object(n.a)({className:Object(i.a)(l.root,l[I],c,"inherit"===b?l.colorInherit:"default"!==b&&l["".concat(I).concat(Object(s.a)(b))],"medium"!==O&&[l["".concat(I,"Size").concat(Object(s.a)(O))],l["size".concat(Object(s.a)(O))]],x&&l.disableElevation,g&&l.disabled,z&&l.fullWidth),component:u,disabled:g,focusRipple:!f,focusVisibleClassName:Object(i.a)(l.focusVisible,k),ref:a,type:N},T),r.createElement("span",{className:l.label},$,t,V))}));a.a=Object(l.a)((function(e){return{root:Object(n.a)({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:Object(c.b)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(c.b)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(c.b)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(Object(c.b)(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:Object(c.b)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(Object(c.b)(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:Object(c.b)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(p)},fMuW:function(e,a,t){"use strict";t.r(a);var o=t("q1tI"),n=t.n(o),r=t("ofer"),i=t("tRbT"),l=t("30+C"),c=t("oa/T"),d=t("Z3vd"),s=t("bzer"),p=t("EGO9"),b=t("9Dj+"),m=t("H8eV"),u=[{bins:["[0, 2500)","[2500, 5000)","[100000, 9223372036854775807)"],counts:[{label:"in market for car: No",data:[500,400,4e3]}],title:"No"},{bins:["[0, 2500)","[2500, 5000)","[100000, 9223372036854775807)"],counts:[{label:"in market for car: Yes",data:[300,300,2800]}],title:"Yes"}],h=[{bins:["No","Yes"],counts:[{label:"in market for car: No",data:[1e3,500]}],title:"No"},{bins:["No","Yes"],counts:[{label:"in market for car: Yes",data:[800,400]}],title:"Yes"}];a.default=function(){var e=Object(o.useState)(0),a=e[0],t=e[1],g=0===a?u:h,y=Object(s.h)("90%"),x=y[0],v=y[1];return n.a.createElement(b.a,null,n.a.createElement(m.a,{title:"Joy Plot",description:""}),n.a.createElement(r.a,{variant:"h2"},"Joy Plot"),n.a.createElement("div",null,n.a.createElement(i.a,{container:!0,spacing:5,className:"wrapper"},n.a.createElement(i.a,{item:!0,xs:12,md:6},n.a.createElement(l.a,null,n.a.createElement(c.a,null,n.a.createElement("div",{ref:x},n.a.createElement(p.a,{data:g,xAxisHeight:20,width:v,height:150*g.length}))))),n.a.createElement(i.a,{item:!0,xs:12,md:6},n.a.createElement(l.a,null,n.a.createElement(c.a,null,n.a.createElement(d.a,{onClick:function(){return t(1===a?0:1)}},"toggle data")))))))}}}]);
//# sourceMappingURL=component---src-pages-joyplot-tsx-da92c3d1094c811a2377.js.map