| @@ -149,33 +149,8 @@ | ||
| 149 | 149 | esc_html__( 'The title of the horizontal axis.', 'visualizer' ) |
| 150 | 150 | ); |
| 151 | 151 | |
| 152 | 152 | self::_renderSelectItem( |
| 153 | - esc_html__( 'Slanted Text', 'visualizer' ), | |
| 154 | - 'hAxis[slantedText]', | |
| 155 | - isset( $this->hAxis['slantedText'] ) ? $this->hAxis['slantedText'] : false, | |
| 156 | - array( | |
| 157 | - false => 'False', | |
| 158 | - true => 'True', | |
| 159 | - ), | |
| 160 | - '', | |
| 161 | - false | |
| 162 | - ); | |
| 163 | - | |
| 164 | - self::_renderTextItem( | |
| 165 | - esc_html__( 'Slanted Text Angle', 'visualizer' ), | |
| 166 | - 'hAxis[slantedTextAngle]', | |
| 167 | - isset( $this->hAxis['slantedTextAngle'] ) ? $this->hAxis['slantedTextAngle'] : 45, | |
| 168 | - '', | |
| 169 | - 45, | |
| 170 | - 'number', | |
| 171 | - array( | |
| 172 | - 'min' => 1, | |
| 173 | - 'step' => 15, | |
| 174 | - ) | |
| 175 | - ); | |
| 176 | - | |
| 177 | - self::_renderSelectItem( | |
| 178 | 153 | esc_html__( 'Text Position', 'visualizer' ), |
| 179 | 154 | 'hAxis[textPosition]', |
| 180 | 155 | isset( $this->hAxis['textPosition'] ) ? $this->hAxis['textPosition'] : '', |
| 181 | 156 | $this->_positions, |
| @@ -213,8 +188,9 @@ | ||
| 213 | 188 | self::_renderGroupStart( esc_html__( 'Horizontal Axis Settings', 'visualizer' ) ); |
| 214 | 189 | self::_renderSectionStart( esc_html__( 'General Settings', 'visualizer' ), false ); |
| 215 | 190 | $this->_renderHorizontalAxisGeneralSettings(); |
| 216 | 191 | self::_renderSectionEnd(); |
| 192 | + | |
| 217 | 193 | if ( $this->_horizontalGridLines ) { |
| 218 | 194 | self::_renderSectionStart( esc_html__( 'Grid Lines', 'visualizer' ), false ); |
| 219 | 195 | self::_renderTextItem( |
| 220 | 196 | esc_html__( 'Count', 'visualizer' ), |
| @@ -219,12 +195,10 @@ | ||
| 219 | 195 | self::_renderTextItem( |
| 220 | 196 | esc_html__( 'Count', 'visualizer' ), |
| 221 | 197 | 'hAxis[gridlines][count]', |
| 222 | 198 | isset( $this->hAxis['gridlines']['count'] ) ? $this->hAxis['gridlines']['count'] : '', |
| 223 | - esc_html__( 'The approximate number of horizontal gridlines inside the chart area. You can specify a value of -1 to automatically compute the number of gridlines, 0 or 1 to draw no gridlines, or 2 or more to only draw gridline. Any number greater than 2 will be used to compute the minSpacing between gridlines.', 'visualizer' ), | |
| 224 | - 5, | |
| 225 | - 'number', | |
| 226 | - array( 'min' => -1, 'max' => 1000, 'step' => 1 ) | |
| 199 | + esc_html__( 'The number of vertical gridlines inside the chart area. Minimum value is 2. Specify -1 to automatically compute the number of gridlines.', 'visualizer' ), | |
| 200 | + 5 | |
| 227 | 201 | ); |
| 228 | 202 | |
| 229 | 203 | self::_renderColorPickerItem( |
| 230 | 204 | esc_html__( 'Color', 'visualizer' ), |
| @@ -236,26 +210,24 @@ | ||
| 236 | 210 | |
| 237 | 211 | self::_renderSectionStart( esc_html__( 'Minor Grid Lines', 'visualizer' ), false ); |
| 238 | 212 | self::_renderTextItem( |
| 239 | 213 | esc_html__( 'Count', 'visualizer' ), |
| 240 | - 'hAxis[minorGridlines][count]', | |
| 241 | - isset( $this->hAxis['minorGridlines']['count'] ) ? $this->hAxis['minorGridlines']['count'] : '', | |
| 242 | - esc_html__( 'Specify 0 to disable the minor gridlines.', 'visualizer' ), | |
| 243 | - 0, | |
| 244 | - 'number', | |
| 245 | - array( 'min' => 0, 'step' => 1 ) | |
| 214 | + 'vAxis[minorGridlines][count]', | |
| 215 | + isset( $this->vAxis['minorGridlines']['count'] ) ? $this->vAxis['minorGridlines']['count'] : '', | |
| 216 | + esc_html__( 'The number of horizontal minor gridlines between two regular gridlines.', 'visualizer' ), | |
| 217 | + 0 | |
| 246 | 218 | ); |
| 247 | 219 | |
| 248 | 220 | self::_renderColorPickerItem( |
| 249 | 221 | esc_html__( 'Color', 'visualizer' ), |
| 250 | - 'hAxis[minorGridlines][color]', | |
| 251 | - isset( $this->hAxis['minorGridlines']['color'] ) ? $this->hAxis['minorGridlines']['color'] : null, | |
| 222 | + 'vAxis[minorGridlines][color]', | |
| 223 | + isset( $this->vAxis['minorGridlines']['color'] ) ? $this->vAxis['minorGridlines']['color'] : null, | |
| 252 | 224 | null |
| 253 | 225 | ); |
| 254 | 226 | self::_renderSectionEnd(); |
| 255 | 227 | } |
| 256 | 228 | |
| 257 | - if ( $this->_horizontalGridLines ) { | |
| 229 | + if ( $this->_verticalGridLines ) { | |
| 258 | 230 | self::_renderSectionStart( esc_html__( 'View Window', 'visualizer' ), false ); |
| 259 | 231 | self::_renderTextItem( |
| 260 | 232 | esc_html__( 'Maximum Value', 'visualizer' ), |
| 261 | 233 | 'hAxis[viewWindow][max]', |
| @@ -335,12 +307,10 @@ | ||
| 335 | 307 | self::_renderTextItem( |
| 336 | 308 | esc_html__( 'Count', 'visualizer' ), |
| 337 | 309 | 'vAxis[gridlines][count]', |
| 338 | 310 | isset( $this->vAxis['gridlines']['count'] ) ? $this->vAxis['gridlines']['count'] : '', |
| 339 | - esc_html__( 'The approximate number of vertical gridlines inside the chart area. You can specify a value of -1 to automatically compute the number of gridlines, 0 or 1 to draw no gridlines, or 2 or more to only draw gridline. Any number greater than 2 will be used to compute the minSpacing between gridlines.', 'visualizer' ), | |
| 340 | - 5, | |
| 341 | - 'number', | |
| 342 | - array( 'min' => -1, 'max' => 1000, 'step' => 1 ) | |
| 311 | + esc_html__( 'The number of horizontal gridlines inside the chart area. Minimum value is 2. Specify -1 to automatically compute the number of gridlines.', 'visualizer' ), | |
| 312 | + 5 | |
| 343 | 313 | ); |
| 344 | 314 | |
| 345 | 315 | self::_renderColorPickerItem( |
| 346 | 316 | esc_html__( 'Color', 'visualizer' ), |
| @@ -352,26 +322,24 @@ | ||
| 352 | 322 | |
| 353 | 323 | self::_renderSectionStart( esc_html__( 'Minor Grid Lines', 'visualizer' ), false ); |
| 354 | 324 | self::_renderTextItem( |
| 355 | 325 | esc_html__( 'Count', 'visualizer' ), |
| 356 | - 'vAxis[minorGridlines][count]', | |
| 357 | - isset( $this->vAxis['minorGridlines']['count'] ) ? $this->vAxis['minorGridlines']['count'] : '', | |
| 358 | - esc_html__( 'Specify 0 to disable the minor gridlines.', 'visualizer' ), | |
| 359 | - 0, | |
| 360 | - 'number', | |
| 361 | - array( 'min' => 0, 'step' => 1 ) | |
| 326 | + 'hAxis[minorGridlines][count]', | |
| 327 | + isset( $this->hAxis['minorGridlines']['count'] ) ? $this->hAxis['minorGridlines']['count'] : '', | |
| 328 | + esc_html__( 'The number of vertical minor gridlines between two regular gridlines.', 'visualizer' ), | |
| 329 | + 0 | |
| 362 | 330 | ); |
| 363 | 331 | |
| 364 | 332 | self::_renderColorPickerItem( |
| 365 | 333 | esc_html__( 'Color', 'visualizer' ), |
| 366 | - 'vAxis[minorGridlines][color]', | |
| 367 | - isset( $this->vAxis['minorGridlines']['color'] ) ? $this->vAxis['minorGridlines']['color'] : null, | |
| 334 | + 'hAxis[minorGridlines][color]', | |
| 335 | + isset( $this->hAxis['minorGridlines']['color'] ) ? $this->hAxis['minorGridlines']['color'] : null, | |
| 368 | 336 | null |
| 369 | 337 | ); |
| 370 | 338 | self::_renderSectionEnd(); |
| 371 | 339 | } |
| 372 | 340 | |
| 373 | - if ( $this->_verticalGridLines ) { | |
| 341 | + if ( $this->_horizontalGridLines ) { | |
| 374 | 342 | self::_renderSectionStart( esc_html__( 'View Window', 'visualizer' ), false ); |
| 375 | 343 | self::_renderTextItem( |
| 376 | 344 | esc_html__( 'Maximum Value', 'visualizer' ), |
| 377 | 345 | 'vAxis[viewWindow][max]', |
| @@ -453,11 +421,8 @@ | ||
| 453 | 421 | 'series[' . $index . '][color]', |
| 454 | 422 | isset( $this->series[ $index ]['color'] ) ? $this->series[ $index ]['color'] : null, |
| 455 | 423 | null |
| 456 | 424 | ); |
| 457 | - | |
| 458 | - $this->_renderRoleField( $index ); | |
| 459 | - | |
| 460 | 425 | } |
| 461 | 426 | |
| 462 | 427 | /** |
| 463 | 428 | * Renders format field for horizontal axis. |
| @@ -480,9 +445,9 @@ | ||
| 480 | 445 | '</a>' |
| 481 | 446 | ), |
| 482 | 447 | sprintf( |
| 483 | 448 | esc_html__( 'For date axis labels, this is a subset of the date formatting %1$sICU date and time format%2$s.', 'visualizer' ), |
| 484 | - '<a href="https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax" target="_blank">', | |
| 449 | + '<a href="http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax" target="_blank">', | |
| 485 | 450 | '</a>' |
| 486 | 451 | ) |
| 487 | 452 | ) |
| 488 | 453 | ); |
| @@ -509,9 +474,9 @@ | ||
| 509 | 474 | '</a>' |
| 510 | 475 | ), |
| 511 | 476 | sprintf( |
| 512 | 477 | esc_html__( 'For date axis labels, this is a subset of the date formatting %1$sICU date and time format%2$s.', 'visualizer' ), |
| 513 | - '<a href="https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax" target="_blank">', | |
| 478 | + '<a href="http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax" target="_blank">', | |
| 514 | 479 | '</a>' |
| 515 | 480 | ) |
| 516 | 481 | ) |
| 517 | 482 | ); |