@import "../themes/index";
$bg-color: getVar(widgets-color-container-background, $widgets-color-container-background);
$bg-shadow: getVar(widgets-circle-inner-shadow, $widgets-circle-inner-shadow);

.#{$base-name}.G2Pie {
  position: relative;
  text-align: center;
  box-sizing: border-box;
  z-index: 0;

  .#{$base-name}.circle-innerBackground {
    background: $bg-color;
    box-shadow: $bg-shadow;
  }

  .#{$base-name}-children {
    position: absolute;
    top: 50%;
    left: 50%;
    text-align: center;
    max-width: 100%;
    max-height: 100%;
    transform: translate(-50%, -50%);
    z-index: 8;
    //overflow: auto;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  //& > div {
  //  height: 100%;
  //  display: inline-flex;
  //  justify-content: center;
  //  align-items: center;
  //  text-align: left;
  //
  //  & > canvas {
  //    position: static;
  //    flex: none;
  //  }
  //
  //  // hack掉图例的高度限制，比用legend.maxLength逻辑要简单
  //  .g2-legend {
  //    max-width: none !important;
  //    max-height: 100% !important;
  //  }
  //
  //  .g2-tooltip-list > li:first-child {
  //    margin-top: 0 !important;
  //  }
  //
  //  .g2-legend-list-item:last-child {
  //    margin-bottom: 1px !important;
  //  }
  //}
}
