public/libraries.js
function () {
            var series = this,
              seriesOptions = series.options,
              chart = series.chart,
              axisOptions;

            each(series.axisTypes || [], function (AXIS) { // repeat for xAxis and yAxis

                each(chart[AXIS], function (axis) { // loop through the chart's axis objects
                    axisOptions = axis.options;

                    // apply if the series xAxis or yAxis option mathches the number of the
                    // axis, or if undefined, use the first axis
                    if ((seriesOptions[AXIS] === axisOptions.index) ||
                      (seriesOptions[AXIS] !== UNDEFINED && seriesOptions[AXIS] === axisOptions.id) ||
                      (seriesOptions[AXIS] === UNDEFINED && axisOptions.index === 0)) {

                        // register this series in the axis.series lookup
                        axis.series.push(series);

                        // set this series.xAxis or series.yAxis reference
                        series[AXIS] = axis;

                        // mark dirty for redraw
                        axis.isDirty = true;
                    }
                });

                // The series needs an X and an Y axis
                if (!series[AXIS] && series.optionalAxis !== AXIS) {
                    error(18, true);
                }

            });
        }
function () {
            var series = this,
              seriesOptions = series.options,
              chart = series.chart,
              axisOptions;

            each(series.axisTypes || [], function (AXIS) { // repeat for xAxis and yAxis

                each(chart[AXIS], function (axis) { // loop through the chart's axis objects
                    axisOptions = axis.options;

                    // apply if the series xAxis or yAxis option mathches the number of the
                    // axis, or if undefined, use the first axis
                    if ((seriesOptions[AXIS] === axisOptions.index) ||
                      (seriesOptions[AXIS] !== UNDEFINED && seriesOptions[AXIS] === axisOptions.id) ||
                      (seriesOptions[AXIS] === UNDEFINED && axisOptions.index === 0)) {

                        // register this series in the axis.series lookup
                        axis.series.push(series);

                        // set this series.xAxis or series.yAxis reference
                        series[AXIS] = axis;

                        // mark dirty for redraw
                        axis.isDirty = true;
                    }
                });

                // The series needs an X and an Y axis
                if (!series[AXIS] && series.optionalAxis !== AXIS) {
                    error(18, true);
                }

            });
        }
function ( ) { var series = this , seriesOptions = series . options , chart = series . chart , axisOptions ; each ( series . axisTypes || [ ] , function ( AXIS ) { // repeat for xAxis and yAxis each ( chart [ AXIS ] , function ( axis ) { // loop through the chart's axis objects axisOptions = axis . options ; // apply if the series xAxis or yAxis option mathches the number of the // axis, or if undefined, use the first axis if ( ( seriesOptions [ AXIS ] === axisOptions . index ) || ( seriesOptions [ AXIS ] !== UNDEFINED && seriesOptions [ AXIS ] === axisOptions . id ) || ( seriesOptions [ AXIS ] === UNDEFINED && axisOptions . index === 0 ) ) { // register this series in the axis.series lookup axis . series . push ( series ) ; // set this series.xAxis or series.yAxis reference series [ AXIS ] = axis ; // mark dirty for redraw axis . isDirty = true ; } } ) ; // The series needs an X and an Y axis if ( ! series [ AXIS ] && series . optionalAxis !== AXIS ) { error ( 18 , true ) ; } } ) ; }
Set the xAxis and yAxis properties of cartesian series, and register the series
in the axis.series array
Set the xAxis and yAxis properties of cartesian series and register the series in the axis . series array