$m-barChart_axis-y_width ?= 40px;
$m-barChart_axis-x_height ?= 30px;
$m-barChart_axis_border ?= #ccc;
$m-barChart_axis-y_offset ?= 10px;
$m-barChart_axis-x_offset ?= 6px;
$m-barChart_line_border ?= #eee;
$m-barChart_line_width ?= 2px;
$m-barChart_line_offset ?= 6px;
$m-barChart_bar_width ?= 60px;

.m-barChart {
    .barChart_grid, .barChart_layer {
        position: absolute;
        bottom: $m-barChart_axis-x_height;
        top: $m-barChart_axis-x_height / 2;
        left: $m-barChart_axis-y_width;
        right: $m-barChart_axis-y_width / 2;
        font-size: 0;
    }

    .barChart_line {
        position: absolute;
    }

    .barChart_line-x {
        left: -$m-barChart_line_offset;
        right: -1px;
        border-top: 1px solid $m-barChart_line_border;
    }

    .barChart_line-y {
        top: -1px;
        bottom: -$m-barChart_line_offset;
        border-left: 1px solid $m-barChart_line_border;
    }

    .barChart_axis {
        position: absolute;
        z-index: 2;
    }

    .barChart_axis-x {
        left: $m-barChart_axis-y_width;
        right: $m-barChart_axis-y_width / 2 - 1px;
        bottom: 0;
        height: $m-barChart_axis-x_height;
        border-top: 1px solid $m-barChart_axis_border;
    }

    .barChart_axis-y {
        left: 0;
        top: $m-barChart_axis-x_height / 2 - 1px;
        bottom: $m-barChart_axis-x_height;
        width: $m-barChart_axis-y_width;
        border-right: 1px solid $m-barChart_axis_border;
    }

    .barChart_label {
        position: absolute;
        font-size: 12px;
    }

    .barChart_label-x {
        @extend .f-toe;
        top: $m-barChart_axis-x_offset;
        bottom: 0;
        // $transform: translateX(-50%);
        text-align: center;
    }

    .barChart_label-y {
        left: 0;
        right: $m-barChart_axis-y_offset;
        $transform: translateY(50%);
        text-align: right;
    }

    .barChart_label-xName {
        right: -50px;
        top: 6px;
        bottom: 0;
    }

    .barChart_label-yName {
        right: 10px;
        top: -30px;
        text-align: right;
    }

    .barChart_layer {
        z-index: 10;
    }

    .barChart_piece {
        position: absolute;
        top: 0;
        bottom: 0;
    }

    .barChart_bar {
        position: absolute;
        $box-sizing: border-box;
        bottom: 0;
        width: $m-barChart_bar_width;
        left: 50%;
        margin-left: -$m-barChart_bar_width / 2;
        background: rgba(0,153,255,0.3);
        border: $m-barChart_line_width solid rgba(0,153,255,0.6);
        border-bottom: none;

        .u-tooltip {
            display: none;
            position: absolute;
            z-index: 10;
            left: 100%;
            top: -2px;
            margin-left: 5px;
            white-space: nowrap;
        }
    }

    .barChart_bar:hover {
        .u-tooltip {
            display: block;
        }
    }

    .barChart_bar-stack {
        border: none;
        background: none;
    }

    .barChart_bar-static {
        position: static;
        width: auto;
        margin: 0;
    }

    .barChart_bar-static:nth-of-type(1) { border-color: rgba(0,153,255,0.6); background: rgba(0,153,255,0.3); }
    .barChart_bar-static:nth-of-type(2) { border-color: rgba(255,174,60,0.6); background: rgba(255,174,60,0.3); }
    .barChart_bar-static:nth-of-type(3) { border-color: rgba(78,201,171,0.6); background: rgba(78,201,171,0.3); }
    .barChart_bar-static:nth-of-type(4) { border-color: rgba(245,131,122,0.6); background: rgba(245,131,122,0.3); }
    .barChart_bar-static:nth-of-type(5) { border-color: rgba(158,156,246,0.6); background: rgba(158,156,246,0.3); }
}
