'use strict';

var RadarModel = require('../../coord/radar/RadarModel.js');
var RadarView = require('./RadarView.js');
var Radar = require('../../coord/radar/Radar.js');

function install(registers) {
  registers.registerCoordinateSystem('radar', Radar.default);
  registers.registerComponentModel(RadarModel.default);
  registers.registerComponentView(RadarView.default);
  registers.registerVisual({
    seriesType: 'radar',
    reset: function (seriesModel) {
      var data = seriesModel.getData();
      // itemVisual symbol is for selected data
      data.each(function (idx) {
        data.setItemVisual(idx, 'legendIcon', 'roundRect');
      });
      // visual is for unselected data
      data.setVisual('legendIcon', 'roundRect');
    }
  });
}

exports.install = install;
