.vislib-container {
  flex: 1 1 0; /* 1 */
  display: flex;
  flex-direction: row;
  overflow: auto;

  &.vislib-container--legend-left {
    flex-direction: row-reverse;
  }
  &.vislib-container--legend-right {
    flex-direction: row;
  }
  &.vislib-container--legend-top {
    flex-direction: column-reverse;
  }
  &.vislib-container--legend-bottom {
    flex-direction: column;
  }
}

.vislib-chart {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

.visualize-chart {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

.vis-wrapper {
  display: flex;
  flex: 1 1 100%;
  flex-direction: row;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  padding: 10px 0;
}

.vis-wrapper svg {
  overflow: visible;
}

/* SVG Element Default Styling */
.vis-wrapper {
  rect {
    opacity: 1;

    &:hover {
      opacity: @vis-hover-opacity;
    }
  }

  circle {
    opacity: 0;

    &:hover {
      opacity: 1;
      stroke-width: 10px;
      stroke-opacity: @vis-hover-opacity;
    }
  }
}

/* YAxis logic */
.y-axis-col-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.y-axis-col {
  display: flex;
  flex-direction: row;
  flex: 1 0 36px;
  min-height: 0;
  min-width: 0;
}

.y-axis-spacer-block {
  min-height: 0px;
}

.y-axis-div-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 20px;
  min-width: 0;
}

.y-axis-div {
  flex: 1 1 25px;
  min-width: 1px;
  min-height: 14px;
  margin: 5px 0px;
}

.y-axis-title {
  min-height: 14px;
  min-width: 1px;
}

.y-axis-chart-title {
  display: flex;
  flex-direction: column;
  min-height: 14px;
  min-width: 0;
}

.y-axis-title text, .x-axis-title text {
  font-size: 9pt;
  fill: @vis-axis-title-color;
  font-weight: bold;
}

.chart-title {
  flex: 1 1 100%;
  min-height: 14px;
  min-width: 14px;
}

.chart-title text {
  font-size: 11px;
  fill: @vis-chart-title-color;
}

.vis-col-wrapper {
  display: flex;
  flex: 1 0 0px;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.chart-wrapper {
  display: flex;
  flex: 1 0 0px;
  overflow: visible;
  margin: 5px;
  min-height: 0;
  min-width: 0;
}

.chart-wrapper-row .chart-wrapper {
  margin-left: 0px;
  margin-right: 0px;
}

.chart-wrapper-column .chart-wrapper {
  margin-top: 0px;
  margin-bottom: 0px;
}

.chart-wrapper-column {
  display: flex;
  flex: 1 0 20px;
  flex-direction: row;
  min-height: 0;
  min-width: 0;
}

.chart-wrapper-row {
  display: flex;
  flex-direction: column;
  flex: 1 1 100%;
  min-height: 0;
  min-width: 0;
}

.chart {
  flex: 1 1 100%;
  min-height: 0;
  min-width: 0;

  > svg {
    display: block;
  }

  overflow: visible;
}

.chart-row {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

.chart-column {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

.x-axis-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 0px;
  min-width: 0;
  overflow: visible;
}

.x-axis-div-wrapper {
  display: flex;
  flex-direction: row;
  min-height: 0px;
  min-width: 0;
}

.x-axis-chart-title {
  display: flex;
  flex-direction: row;
  min-height: 1px;
  max-height: 15px;
  min-width: 20px;
}

.x-axis-title {
  min-width: 20px;
}

.x-axis-div {
  min-height: 0px;
  min-width: 1px;
  margin: 0px 5px;
  width: 100%;
}

.x-axis-div svg {
  float: left; /* for some reason svg wont get positioned in top left corner of container div without this */
}

.axis-wrapper-top .axis-div svg {
  margin-bottom: -5px;
}

.chart-first {
  margin-top: 0px;
  margin-left: 0px
}
.chart-last {
  margin-bottom: 0px;
  margin-right: 0px;
}

.label-line {
  opacity: .3;
  stroke: black;
  stroke-width: 2px;
  fill: none;
}

.label-text {
  font-size: 130%;
  font-weight: normal;
}

// SASSTODO: Make sure these colors convert to theme variables
.tab-dashboard.theme-dark {
  .y-axis-title text, .x-axis-title text {
    fill: @gray10;
  }

  .chart-title text {
    fill: @gray10;
  }
}
