.emonitor-chart-wrapper {
  height: 280px;
  display: flex;
  flex-direction: column;
  position: relative;

  .emonitor-chart-area {
    position: relative;
    flex: 1;
    width: 100%;
    height: 0;
    //overflow: hidden;

    .emonitor-chart {
      //width: 100%;
      //height: 100%;
      position: absolute;
      left: 0;
      top: 0;
    }

    .emonitor-chart-crosshair {
      position: absolute;
      border-left: 1px dashed @colorblind-color-error;
      left: 0;
      top: 0;
      pointer-events: none;
    }
  }

  /* Legend 样式 */
  .emonitor-chart-legend-wrapper {
    display: inline-block;
    max-height: 60px;
    overflow: auto;
    flex-shrink: 0;
    user-select: unset;

    .emonitor-chart-legend {
      display: inline-block;
    }

    /* 表格样式 */
    &.as-table {
      max-height: 100px;

      .emonitor-chart-legend {
        display: table;
        padding: 0 4px;
        width: 100%;
        margin: 0;

        /* asTable 时表头相关 */
        .emonitor-chart-legend-table-header {
          display: table-row;

          .emonitor-chart-legend-th-content {
            display: table-cell;
            text-align: right;
            font-size: 12px;
            font-weight: bold;
            padding: 3px 6px;
            color: #2AB2E4;
            cursor: pointer;
            white-space: nowrap;
            user-select: none;

            &.no-pointer {
              cursor: default;
              text-align: left;
            }

            &.order::after {
              display: inline-block;
              padding: 0 0 0 4px;
              content: "▲";
              transition: all 0.2s;
              transform: rotateX(0);
            }

            &.order.desc::after {
              transform: rotateX(180deg);
            }
          }
        }

        .emonitor-chart-legend-series {
          display: table-row;
        }

        .emonitor-chart-legend-alias,
        .emonitor-chart-legend-value {
          display: table-cell;
        }

        .emonitor-chart-legend-alias {
          text-align: left;
        }

        .emonitor-chart-legend-value {
          text-align: right;
        }

        .emonitor-chart-legend-value-label {
          display: none;
        }

        .emonitor-chart-legend-search {
          width: 100%;
        }
      }
    }
  }

  /* 各 Series 对应的 Legend */
  .emonitor-chart-legend-series {
    display: inline-block;
    font-size: 12px;
    cursor: pointer;
    padding: 0 5px;
    opacity: 0.35;
    transition: opacity 0.25s;

    &.selected {
      opacity: 1;
    }

    &.hidden {
      visibility: collapse;
    }

    /* Legend Alias */
    .emonitor-chart-legend-alias {
      padding: 0 5px;
      font-weight: bold;
      white-space: nowrap;

      .emonitor-chart-legend-icon-wrapper {
        display: inline-block;
        text-align: center;
        padding-right: 4px;

        .emonitor-chart-legend-icon {
          display: inline-block;
          height: 3px;
          width: 15px;
          vertical-align: middle;
          transform: translateY(-1px);
          position: relative;

          &.round {
            height: 10px;
            width: 10px;
            border-radius: 5px;
          }

          &.point {
            height: 8px;
            width: 8px;
            border-radius: 50%;

            &::after {
              content: "";
              width: 6px;
              height: 6px;
              position: absolute;
              left: 50%;
              top: 50%;
              /*top: 3px;*/
              transform: translate(-50%, -50%);
              background-color: inherit;
              border-radius: 50%;
            }
          }
        }
      }
    }

    /* Legend 内显示的 value */
    .emonitor-chart-legend-value {
      display: inline-block;
      padding: 0 6px;
    }
  }

  /* Legend 于右侧样式 */
  &.legend-to-right {
    flex-direction: row;

    .emonitor-chart-area {
      flex: 1;
      width: auto;
      height: 100%;
    }

    .emonitor-chart-legend-wrapper {
      align-self: flex-start;
      min-height: 100%;
      flex-shrink: 1;
    }

    .emonitor-chart-legend-series {
      display: block;
      text-align: left;
    }
  }

  /* 垂直样式 */
  &.layout-vertical {
    .emonitor-chart-legend-series {
      display: block;
      text-align: left;
    }
  }


  ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }

  ::-webkit-scrollbar-thumb {
    background: #c9cacd;
    border-radius: 3px;
  }
}
