| @@ -82,6 +82,30 @@ | ||
| 82 | 82 | wp_enqueue_script( 'visualizer-render-google-lib', VISUALIZER_ABSURL . 'js/render-google.js', array_merge( $deps, array( 'visualizer-google-jsapi-old' ) ), Visualizer_Plugin::VERSION, true ); |
| 83 | 83 | return 'visualizer-render-google-lib'; |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | - | |
| 86 | + /** | |
| 87 | + * Renders the role field. | |
| 88 | + * | |
| 89 | + * @since 3.4.0 | |
| 90 | + * | |
| 91 | + * @access protected | |
| 92 | + */ | |
| 93 | + protected function _renderRoleField( $index ) { | |
| 94 | + self::_renderSelectItem( | |
| 95 | + esc_html__( 'Special Role', 'visualizer' ), | |
| 96 | + 'series[' . $index . '][role]', | |
| 97 | + isset( $this->series[ $index ]['role'] ) ? $this->series[ $index ]['role'] : '', | |
| 98 | + array( | |
| 99 | + '' => esc_html__( 'Default (Data)', 'visualizer' ), | |
| 100 | + 'annotation' => esc_html__( 'Annotation', 'visualizer' ), | |
| 101 | + 'annotationText' => esc_html__( 'Annotation Text', 'visualizer' ), | |
| 102 | + 'certainty' => esc_html__( 'Certainty', 'visualizer' ), | |
| 103 | + 'emphasis' => esc_html__( 'Emphasis', 'visualizer' ), | |
| 104 | + 'scope' => esc_html__( 'Scope', 'visualizer' ), | |
| 105 | + 'style' => esc_html__( 'Style', 'visualizer' ), | |
| 106 | + 'tooltip' => esc_html__( 'Tooltip', 'visualizer' ), | |
| 107 | + ), | |
| 108 | + sprintf( esc_html__( 'Determines whether the series has to be used for a special role as mentioned in %1$shere%2$s. You can view a few examples %3$shere%4$s.', 'visualizer' ), '<a href="https://developers.google.com/chart/interactive/docs/roles#what-roles-are-available" target="_blank">', '</a>', '<a href="https://docs.themeisle.com/article/1160-roles-for-series-visualizer" target="_blank">', '</a>' ) | |
| 109 | + ); | |
| 110 | + } | |
| 87 | 111 | } |