0, 'male' => 0, self::UNKNOWN_KEY => 0 ); protected $type; protected $has_data = false; /** * WP_Auth0_Dashboard_Plugins_Gender constructor. * * @deprecated - 3.6.0, the plugin no longer supports the dashboard widgets functionality. * * @param WP_Auth0_Options $a0_options */ public function __construct( WP_Auth0_Options $a0_options ) { // phpcs:ignore @trigger_error( sprintf( __( 'Class %s is deprecated.', 'wp-auth0' ), __CLASS__ ), E_USER_DEPRECATED ); $this->a0_options = $a0_options; $this->type = $this->a0_options->get( 'chart_gender_type' ); } public function render() { $chartSetup = array( 'bindto' => '#auth0ChartGender', 'data' => array( 'type' => $this->type, 'selection' => array( 'enabled' => true ), ), 'color' => array( 'pattern' => array( '#ff4282', '#3e68ef', '#1ABC9C', '#2ECC71', '#3498DB', '#9B59B6', '#34495E', '#F1C40F', '#E67E22', '#E74C3C', '#F39C12' ), ), 'axis' => array( 'x' => array( 'type' => 'category' ) ) ); if ( $this->type == 'bar' ) { $chartSetup['data']['x'] = 'x'; } ?>