src/charts/bar.js
function drawAxisLabels() {
            if (yAxisLabel) {
                if (yAxisLabelEl) {
                    yAxisLabelEl.remove();
                }
                yAxisLabelEl = svg.select('.y-axis-label')
                  .append('text')
                    .classed('y-axis-label-text', true)
                    .attr('x', -chartHeight / 2)
                    .attr('y', yAxisLabelOffset)
                    .attr('text-anchor', 'middle')
                    .attr('transform', 'rotate(270 0 0)')
                    .text(yAxisLabel);
            }

            if (xAxisLabel) {
                if (xAxisLabelEl) {
                    xAxisLabelEl.remove();
                }
                xAxisLabelEl = svg.select('.x-axis-label')
                  .append('text')
                    .attr('y', xAxisLabelOffset)
                    .attr('text-anchor', 'middle')
                    .classed('x-axis-label-text', true)
                    .attr('x', chartWidth / 2)
                    .text(xAxisLabel);
            }
        }
function drawAxisLabels() {
            if (yAxisLabel) {
                if (yAxisLabelEl) {
                    yAxisLabelEl.remove();
                }
                yAxisLabelEl = svg.select('.y-axis-label')
                  .append('text')
                    .classed('y-axis-label-text', true)
                    .attr('x', -chartHeight / 2)
                    .attr('y', yAxisLabelOffset)
                    .attr('text-anchor', 'middle')
                    .attr('transform', 'rotate(270 0 0)')
                    .text(yAxisLabel);
            }

            if (xAxisLabel) {
                if (xAxisLabelEl) {
                    xAxisLabelEl.remove();
                }
                xAxisLabelEl = svg.select('.x-axis-label')
                  .append('text')
                    .attr('y', xAxisLabelOffset)
                    .attr('text-anchor', 'middle')
                    .classed('x-axis-label-text', true)
                    .attr('x', chartWidth / 2)
                    .text(xAxisLabel);
            }
        }
function drawAxisLabels ( ) { if ( yAxisLabel ) { if ( yAxisLabelEl ) { yAxisLabelEl . remove ( ) ; } yAxisLabelEl = svg . select ( '.y-axis-label' ) . append ( 'text' ) . classed ( 'y-axis-label-text' , true ) . attr ( 'x' , - chartHeight / 2 ) . attr ( 'y' , yAxisLabelOffset ) . attr ( 'text-anchor' , 'middle' ) . attr ( 'transform' , 'rotate(270 0 0)' ) . text ( yAxisLabel ) ; } if ( xAxisLabel ) { if ( xAxisLabelEl ) { xAxisLabelEl . remove ( ) ; } xAxisLabelEl = svg . select ( '.x-axis-label' ) . append ( 'text' ) . attr ( 'y' , xAxisLabelOffset ) . attr ( 'text-anchor' , 'middle' ) . classed ( 'x-axis-label-text' , true ) . attr ( 'x' , chartWidth / 2 ) . text ( xAxisLabel ) ; } }
Draws the x and y axis custom labels respective groups
@private
Draws the x and y axis custom labels respective groups