| @@ -128,15 +128,11 @@ | ||
| 128 | 128 | self::_renderTextAreaItem( |
| 129 | 129 | esc_html__( 'Chart Description', 'visualizer' ), |
| 130 | 130 | 'description', |
| 131 | 131 | $this->description, |
| 132 | - sprintf( | |
| 133 | - // translators: %1$s - HTML link tag, %2$s - HTML closing link tag. | |
| 134 | - esc_html__( 'Description to display in the structured data schema as explained %1$shere%2$s', 'visualizer' ), | |
| 135 | - '<a href="https://developers.google.com/search/docs/data-types/dataset#dataset" target="_blank">', | |
| 136 | - '</a>' | |
| 137 | - ) | |
| 132 | + sprintf( esc_html__( 'Description to display in the structured data schema as explained %1$shere%2$s', 'visualizer' ), '<a href="https://developers.google.com/search/docs/data-types/dataset#dataset" target="_blank">', '</a>' ) | |
| 138 | 133 | ); |
| 134 | + | |
| 139 | 135 | } |
| 140 | 136 | |
| 141 | 137 | /** |
| 142 | 138 | * Renders general settings block for horizontal axis settings. |
| @@ -153,33 +149,8 @@ | ||
| 153 | 149 | esc_html__( 'The title of the horizontal axis.', 'visualizer' ) |
| 154 | 150 | ); |
| 155 | 151 | |
| 156 | 152 | self::_renderSelectItem( |
| 157 | - esc_html__( 'Slanted Text', 'visualizer' ), | |
| 158 | - 'hAxis[slantedText]', | |
| 159 | - isset( $this->hAxis['slantedText'] ) ? $this->hAxis['slantedText'] : false, | |
| 160 | - array( | |
| 161 | - false => 'False', | |
| 162 | - true => 'True', | |
| 163 | - ), | |
| 164 | - '', | |
| 165 | - false | |
| 166 | - ); | |
| 167 | - | |
| 168 | - self::_renderTextItem( | |
| 169 | - esc_html__( 'Slanted Text Angle', 'visualizer' ), | |
| 170 | - 'hAxis[slantedTextAngle]', | |
| 171 | - isset( $this->hAxis['slantedTextAngle'] ) ? $this->hAxis['slantedTextAngle'] : 45, | |
| 172 | - '', | |
| 173 | - 45, | |
| 174 | - 'number', | |
| 175 | - array( | |
| 176 | - 'min' => 1, | |
| 177 | - 'step' => 15, | |
| 178 | - ) | |
| 179 | - ); | |
| 180 | - | |
| 181 | - self::_renderSelectItem( | |
| 182 | 153 | esc_html__( 'Text Position', 'visualizer' ), |
| 183 | 154 | 'hAxis[textPosition]', |
| 184 | 155 | isset( $this->hAxis['textPosition'] ) ? $this->hAxis['textPosition'] : '', |
| 185 | 156 | $this->_positions, |
| @@ -191,9 +162,9 @@ | ||
| 191 | 162 | 'hAxis[direction]', |
| 192 | 163 | isset( $this->hAxis['direction'] ) ? $this->hAxis['direction'] : '', |
| 193 | 164 | array( |
| 194 | 165 | '' => '', |
| 195 | - '1' => esc_html__( 'Default Direction', 'visualizer' ), | |
| 166 | + '1' => esc_html__( 'Identical Direction', 'visualizer' ), | |
| 196 | 167 | '-1' => esc_html__( 'Reverse Direction', 'visualizer' ), |
| 197 | 168 | ), |
| 198 | 169 | esc_html__( 'The direction in which the values along the horizontal axis grow.', 'visualizer' ) |
| 199 | 170 | ); |
| @@ -217,8 +188,9 @@ | ||
| 217 | 188 | self::_renderGroupStart( esc_html__( 'Horizontal Axis Settings', 'visualizer' ) ); |
| 218 | 189 | self::_renderSectionStart( esc_html__( 'General Settings', 'visualizer' ), false ); |
| 219 | 190 | $this->_renderHorizontalAxisGeneralSettings(); |
| 220 | 191 | self::_renderSectionEnd(); |
| 192 | + | |
| 221 | 193 | if ( $this->_horizontalGridLines ) { |
| 222 | 194 | self::_renderSectionStart( esc_html__( 'Grid Lines', 'visualizer' ), false ); |
| 223 | 195 | self::_renderTextItem( |
| 224 | 196 | esc_html__( 'Count', 'visualizer' ), |
| @@ -240,20 +212,20 @@ | ||
| 240 | 212 | |
| 241 | 213 | self::_renderSectionStart( esc_html__( 'Minor Grid Lines', 'visualizer' ), false ); |
| 242 | 214 | self::_renderTextItem( |
| 243 | 215 | esc_html__( 'Count', 'visualizer' ), |
| 244 | - 'hAxis[minorGridlines][count]', | |
| 245 | - isset( $this->hAxis['minorGridlines']['count'] ) ? $this->hAxis['minorGridlines']['count'] : '', | |
| 216 | + 'vAxis[minorGridlines][count]', | |
| 217 | + isset( $this->vAxis['minorGridlines']['count'] ) ? $this->vAxis['minorGridlines']['count'] : '', | |
| 246 | 218 | esc_html__( 'Specify 0 to disable the minor gridlines.', 'visualizer' ), |
| 247 | 219 | 0, |
| 248 | 220 | 'number', |
| 249 | - array( 'min' => 0, 'step' => 1 ) | |
| 221 | + array( 'min' => 0, 'max' => 1, 'step' => 1 ) | |
| 250 | 222 | ); |
| 251 | 223 | |
| 252 | 224 | self::_renderColorPickerItem( |
| 253 | 225 | esc_html__( 'Color', 'visualizer' ), |
| 254 | - 'hAxis[minorGridlines][color]', | |
| 255 | - isset( $this->hAxis['minorGridlines']['color'] ) ? $this->hAxis['minorGridlines']['color'] : null, | |
| 226 | + 'vAxis[minorGridlines][color]', | |
| 227 | + isset( $this->vAxis['minorGridlines']['color'] ) ? $this->vAxis['minorGridlines']['color'] : null, | |
| 256 | 228 | null |
| 257 | 229 | ); |
| 258 | 230 | self::_renderSectionEnd(); |
| 259 | 231 | } |
| @@ -306,9 +278,9 @@ | ||
| 306 | 278 | 'vAxis[direction]', |
| 307 | 279 | isset( $this->vAxis['direction'] ) ? $this->vAxis['direction'] : '', |
| 308 | 280 | array( |
| 309 | 281 | '' => '', |
| 310 | - '1' => esc_html__( 'Default Direction', 'visualizer' ), | |
| 282 | + '1' => esc_html__( 'Identical Direction', 'visualizer' ), | |
| 311 | 283 | '-1' => esc_html__( 'Reverse Direction', 'visualizer' ), |
| 312 | 284 | ), |
| 313 | 285 | esc_html__( 'The direction in which the values along the vertical axis grow.', 'visualizer' ) |
| 314 | 286 | ); |
| @@ -356,20 +328,20 @@ | ||
| 356 | 328 | |
| 357 | 329 | self::_renderSectionStart( esc_html__( 'Minor Grid Lines', 'visualizer' ), false ); |
| 358 | 330 | self::_renderTextItem( |
| 359 | 331 | esc_html__( 'Count', 'visualizer' ), |
| 360 | - 'vAxis[minorGridlines][count]', | |
| 361 | - isset( $this->vAxis['minorGridlines']['count'] ) ? $this->vAxis['minorGridlines']['count'] : '', | |
| 332 | + 'hAxis[minorGridlines][count]', | |
| 333 | + isset( $this->hAxis['minorGridlines']['count'] ) ? $this->hAxis['minorGridlines']['count'] : '', | |
| 362 | 334 | esc_html__( 'Specify 0 to disable the minor gridlines.', 'visualizer' ), |
| 363 | 335 | 0, |
| 364 | 336 | 'number', |
| 365 | - array( 'min' => 0, 'step' => 1 ) | |
| 337 | + array( 'min' => 0, 'max' => 1, 'step' => 1 ) | |
| 366 | 338 | ); |
| 367 | 339 | |
| 368 | 340 | self::_renderColorPickerItem( |
| 369 | 341 | esc_html__( 'Color', 'visualizer' ), |
| 370 | - 'vAxis[minorGridlines][color]', | |
| 371 | - isset( $this->vAxis['minorGridlines']['color'] ) ? $this->vAxis['minorGridlines']['color'] : null, | |
| 342 | + 'hAxis[minorGridlines][color]', | |
| 343 | + isset( $this->hAxis['minorGridlines']['color'] ) ? $this->hAxis['minorGridlines']['color'] : null, | |
| 372 | 344 | null |
| 373 | 345 | ); |
| 374 | 346 | self::_renderSectionEnd(); |
| 375 | 347 | } |
| @@ -459,8 +431,9 @@ | ||
| 459 | 431 | null |
| 460 | 432 | ); |
| 461 | 433 | |
| 462 | 434 | $this->_renderRoleField( $index ); |
| 435 | + | |
| 463 | 436 | } |
| 464 | 437 | |
| 465 | 438 | /** |
| 466 | 439 | * Renders format field for horizontal axis. |
| @@ -477,17 +450,15 @@ | ||
| 477 | 450 | sprintf( |
| 478 | 451 | '%s<br><br>%s<br><br>%s', |
| 479 | 452 | esc_html__( 'Enter custom format pattern to apply to horizontal axis labels.', 'visualizer' ), |
| 480 | 453 | sprintf( |
| 481 | - // translators: %1$s - HTML link tag, %2$s - HTML closing link tag. | |
| 482 | - esc_html__( 'For number axis labels, this is a subset of the decimal formatting %1$sICU pattern set%2$s. For instance, $#,###.## will display values $1,234.56 for value 1234.56. Note: Using the #%% percentage format will multiply your values by 100.', 'visualizer' ), | |
| 454 | + esc_html__( 'For number axis labels, this is a subset of the decimal formatting %1$sICU pattern set%2$s. For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.', 'visualizer' ), | |
| 483 | 455 | '<a href="http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details" target="_blank">', |
| 484 | 456 | '</a>' |
| 485 | 457 | ), |
| 486 | 458 | sprintf( |
| 487 | - // translators: %1$s - HTML link tag, %2$s - HTML closing link tag. | |
| 488 | 459 | esc_html__( 'For date axis labels, this is a subset of the date formatting %1$sICU date and time format%2$s.', 'visualizer' ), |
| 489 | - '<a href="https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax" target="_blank">', | |
| 460 | + '<a href="http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax" target="_blank">', | |
| 490 | 461 | '</a>' |
| 491 | 462 | ) |
| 492 | 463 | ) |
| 493 | 464 | ); |
| @@ -508,19 +479,18 @@ | ||
| 508 | 479 | sprintf( |
| 509 | 480 | '%s<br><br>%s<br><br>%s', |
| 510 | 481 | esc_html__( 'Enter custom format pattern to apply to vertical axis labels.', 'visualizer' ), |
| 511 | 482 | sprintf( |
| 512 | - // translators: %1$s - HTML link tag, %2$s - HTML closing link tag. | |
| 513 | - esc_html__( 'For number axis labels, this is a subset of the decimal formatting %1$sICU pattern set%2$s. For instance, $#,###.## will display values $1,234.56 for value 1234.56. Note: Using the #%% percentage format will multiply your values by 100.', 'visualizer' ), | |
| 483 | + esc_html__( 'For number axis labels, this is a subset of the decimal formatting %1$sICU pattern set%2$s. For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.', 'visualizer' ), | |
| 514 | 484 | '<a href="http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details" target="_blank">', |
| 515 | 485 | '</a>' |
| 516 | 486 | ), |
| 517 | 487 | sprintf( |
| 518 | - // translators: %1$s - HTML link tag, %2$s - HTML closing link tag. | |
| 519 | 488 | esc_html__( 'For date axis labels, this is a subset of the date formatting %1$sICU date and time format%2$s.', 'visualizer' ), |
| 520 | - '<a href="https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax" target="_blank">', | |
| 489 | + '<a href="http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax" target="_blank">', | |
| 521 | 490 | '</a>' |
| 522 | 491 | ) |
| 523 | 492 | ) |
| 524 | 493 | ); |
| 525 | 494 | } |
| 495 | + | |
| 526 | 496 | } |