1/* 2 * Copyright (c) 2021-2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @file 18 * @kit ArkUI 19 */ 20 21/** 22 * Defines Gauge constructor options. 23 * 24 * @interface GaugeOptions 25 * @syscap SystemCapability.ArkUI.ArkUI.Full 26 * @crossplatform 27 * @form 28 * @atomicservice 29 * @since 14 30 */ 31interface GaugeOptions { 32 /** 33 * Set current data value. 34 * 35 * @type { number } 36 * @syscap SystemCapability.ArkUI.ArkUI.Full 37 * @since 8 38 */ 39 /** 40 * Set current data value. 41 * 42 * @type { number } 43 * @syscap SystemCapability.ArkUI.ArkUI.Full 44 * @form 45 * @since 9 46 */ 47 /** 48 * Set current data value. 49 * 50 * @type { number } 51 * @syscap SystemCapability.ArkUI.ArkUI.Full 52 * @crossplatform 53 * @form 54 * @since 10 55 */ 56 /** 57 * Set current data value. 58 * 59 * @type { number } 60 * @syscap SystemCapability.ArkUI.ArkUI.Full 61 * @crossplatform 62 * @form 63 * @atomicservice 64 * @since 11 65 */ 66 value: number; 67 68 /** 69 * Set current segment minimum value. 70 * 71 * @type { ?number } 72 * @syscap SystemCapability.ArkUI.ArkUI.Full 73 * @since 8 74 */ 75 /** 76 * Set current segment minimum value. 77 * 78 * @type { ?number } 79 * @syscap SystemCapability.ArkUI.ArkUI.Full 80 * @form 81 * @since 9 82 */ 83 /** 84 * Set current segment minimum value. 85 * 86 * @type { ?number } 87 * @syscap SystemCapability.ArkUI.ArkUI.Full 88 * @crossplatform 89 * @form 90 * @since 10 91 */ 92 /** 93 * Set current segment minimum value. 94 * 95 * @type { ?number } 96 * @syscap SystemCapability.ArkUI.ArkUI.Full 97 * @crossplatform 98 * @form 99 * @atomicservice 100 * @since 11 101 */ 102 min?: number; 103 104 /** 105 * Set current segment maximum value. 106 * 107 * @type { ?number } 108 * @syscap SystemCapability.ArkUI.ArkUI.Full 109 * @since 8 110 */ 111 /** 112 * Set current segment maximum value. 113 * 114 * @type { ?number } 115 * @syscap SystemCapability.ArkUI.ArkUI.Full 116 * @form 117 * @since 9 118 */ 119 /** 120 * Set current segment maximum value. 121 * 122 * @type { ?number } 123 * @syscap SystemCapability.ArkUI.ArkUI.Full 124 * @crossplatform 125 * @form 126 * @since 10 127 */ 128 /** 129 * Set current segment maximum value. 130 * 131 * @type { ?number } 132 * @syscap SystemCapability.ArkUI.ArkUI.Full 133 * @crossplatform 134 * @form 135 * @atomicservice 136 * @since 11 137 */ 138 max?: number; 139} 140 141/** 142 * Defines the Gauge component. 143 * 144 * @interface GaugeInterface 145 * @syscap SystemCapability.ArkUI.ArkUI.Full 146 * @since 8 147 */ 148/** 149 * Defines the Gauge component. 150 * 151 * @interface GaugeInterface 152 * @syscap SystemCapability.ArkUI.ArkUI.Full 153 * @form 154 * @since 9 155 */ 156/** 157 * Defines the Gauge component. 158 * 159 * @interface GaugeInterface 160 * @syscap SystemCapability.ArkUI.ArkUI.Full 161 * @crossplatform 162 * @form 163 * @since 10 164 */ 165/** 166 * Defines the Gauge component. 167 * 168 * @interface GaugeInterface 169 * @syscap SystemCapability.ArkUI.ArkUI.Full 170 * @crossplatform 171 * @form 172 * @atomicservice 173 * @since 11 174 */ 175interface GaugeInterface { 176 /** 177 * value:Current data value. 178 * min: Current Segment Minimum Value 179 * max: Current Segment Maximum Value 180 * 181 * @param { object } options 182 * @returns { GaugeAttribute } 183 * @syscap SystemCapability.ArkUI.ArkUI.Full 184 * @since 8 185 */ 186 /** 187 * value:Current data value. 188 * min: Current Segment Minimum Value 189 * max: Current Segment Maximum Value 190 * 191 * @param { object } options 192 * @returns { GaugeAttribute } 193 * @syscap SystemCapability.ArkUI.ArkUI.Full 194 * @form 195 * @since 9 196 */ 197 /** 198 * value:Current data value. 199 * min: Current Segment Minimum Value 200 * max: Current Segment Maximum Value 201 * 202 * @param { object } options 203 * @returns { GaugeAttribute } 204 * @syscap SystemCapability.ArkUI.ArkUI.Full 205 * @crossplatform 206 * @form 207 * @since 10 208 */ 209 /** 210 * value:Current data value. 211 * min: Current Segment Minimum Value 212 * max: Current Segment Maximum Value 213 * 214 * @param { object } options 215 * @returns { GaugeAttribute } 216 * @syscap SystemCapability.ArkUI.ArkUI.Full 217 * @crossplatform 218 * @form 219 * @atomicservice 220 * @since 11 221 */ 222 /** 223 * Called when the gauge component is used. 224 * 225 * @param { GaugeOptions } options - Gauge options. 226 * @returns { GaugeAttribute } 227 * @syscap SystemCapability.ArkUI.ArkUI.Full 228 * @crossplatform 229 * @form 230 * @atomicservice 231 * @since 14 232 */ 233 (options: GaugeOptions): GaugeAttribute; 234} 235 236/** 237 * Defines the options of gauge track shadow. 238 * 239 * @interface GaugeShadowOptions 240 * @syscap SystemCapability.ArkUI.ArkUI.Full 241 * @crossplatform 242 * @since 11 243 */ 244/** 245 * Defines the options of gauge track shadow. 246 * 247 * @interface GaugeShadowOptions 248 * @syscap SystemCapability.ArkUI.ArkUI.Full 249 * @crossplatform 250 * @atomicservice 251 * @since 12 252 */ 253declare interface GaugeShadowOptions extends MultiShadowOptions {} 254 255/** 256 * Defines the options of gauge indicator. 257 * 258 * @interface GaugeIndicatorOptions 259 * @syscap SystemCapability.ArkUI.ArkUI.Full 260 * @crossplatform 261 * @since 11 262 */ 263/** 264 * Defines the options of gauge indicator. 265 * 266 * @interface GaugeIndicatorOptions 267 * @syscap SystemCapability.ArkUI.ArkUI.Full 268 * @crossplatform 269 * @atomicservice 270 * @since 12 271 */ 272declare interface GaugeIndicatorOptions { 273 274 /** 275 * Current indicator icon path. 276 * 277 * @type { ?ResourceStr } option type - the current option type. 278 * @default system style. 279 * @syscap SystemCapability.ArkUI.ArkUI.Full 280 * @crossplatform 281 * @since 11 282 */ 283 /** 284 * Current indicator icon path. 285 * 286 * @type { ?ResourceStr } option type - the current option type. 287 * @default system style. 288 * @syscap SystemCapability.ArkUI.ArkUI.Full 289 * @crossplatform 290 * @atomicservice 291 * @since 12 292 */ 293 icon?: ResourceStr; 294 295 /** 296 * Current indicator space. 297 * 298 * @type { ?Dimension } indicator space - the current indicator space. 299 * @default 8 300 * @syscap SystemCapability.ArkUI.ArkUI.Full 301 * @crossplatform 302 * @since 11 303 */ 304 /** 305 * Current indicator space. 306 * 307 * @type { ?Dimension } indicator space - the current indicator space. 308 * @default 8 309 * @syscap SystemCapability.ArkUI.ArkUI.Full 310 * @crossplatform 311 * @atomicservice 312 * @since 12 313 */ 314 space?: Dimension; 315} 316 317/** 318 * GaugeConfiguration used by content modifier 319 * 320 * @interface GaugeConfiguration 321 * @syscap SystemCapability.ArkUI.ArkUI.Full 322 * @crossplatform 323 * @atomicservice 324 * @since 12 325 */ 326declare interface GaugeConfiguration extends CommonConfiguration<GaugeConfiguration> { 327 /** 328 * Current data value. 329 * 330 * @type { number } data value - the current data value. 331 * @syscap SystemCapability.ArkUI.ArkUI.Full 332 * @crossplatform 333 * @atomicservice 334 * @since 12 335 */ 336 value: number; 337 338 /** 339 * Current Segment Minimum Value. 340 * 341 * @type { number } segment minimum value - the current segment minimum value. 342 * @syscap SystemCapability.ArkUI.ArkUI.Full 343 * @crossplatform 344 * @atomicservice 345 * @since 12 346 */ 347 min: number; 348 349 /** 350 * Current Segment Maximum Value. 351 * 352 * @type { number } segment maximum value - the current segment maximum value. 353 * @syscap SystemCapability.ArkUI.ArkUI.Full 354 * @crossplatform 355 * @atomicservice 356 * @since 12 357 */ 358 max: number; 359} 360 361/** 362 * @extends CommonMethod<GaugeAttribute> 363 * @syscap SystemCapability.ArkUI.ArkUI.Full 364 * @since 8 365 */ 366/** 367 * @extends CommonMethod<GaugeAttribute> 368 * @syscap SystemCapability.ArkUI.ArkUI.Full 369 * @form 370 * @since 9 371 */ 372/** 373 * @extends CommonMethod<GaugeAttribute> 374 * @syscap SystemCapability.ArkUI.ArkUI.Full 375 * @crossplatform 376 * @form 377 * @since 10 378 */ 379/** 380 * @extends CommonMethod<GaugeAttribute> 381 * @syscap SystemCapability.ArkUI.ArkUI.Full 382 * @crossplatform 383 * @form 384 * @atomicservice 385 * @since 11 386 */ 387declare class GaugeAttribute extends CommonMethod<GaugeAttribute> { 388 /** 389 * Sets the value for the current profile. 390 * 391 * @param { number } value 392 * @returns { GaugeAttribute } 393 * @syscap SystemCapability.ArkUI.ArkUI.Full 394 * @since 8 395 */ 396 /** 397 * Sets the value for the current profile. 398 * 399 * @param { number } value 400 * @returns { GaugeAttribute } 401 * @syscap SystemCapability.ArkUI.ArkUI.Full 402 * @form 403 * @since 9 404 */ 405 /** 406 * Sets the value for the current profile. 407 * 408 * @param { number } value 409 * @returns { GaugeAttribute } 410 * @syscap SystemCapability.ArkUI.ArkUI.Full 411 * @crossplatform 412 * @form 413 * @since 10 414 */ 415 /** 416 * Sets the value for the current profile. 417 * 418 * @param { number } value 419 * @returns { GaugeAttribute } 420 * @syscap SystemCapability.ArkUI.ArkUI.Full 421 * @crossplatform 422 * @form 423 * @atomicservice 424 * @since 11 425 */ 426 value(value: number): GaugeAttribute; 427 428 /** 429 * Set the start angle. Clock 0 is 0 degrees and clockwise is positive. 430 * 431 * @param { number } angle 432 * @returns { GaugeAttribute } 433 * @syscap SystemCapability.ArkUI.ArkUI.Full 434 * @since 8 435 */ 436 /** 437 * Set the start angle. Clock 0 is 0 degrees and clockwise is positive. 438 * 439 * @param { number } angle 440 * @returns { GaugeAttribute } 441 * @syscap SystemCapability.ArkUI.ArkUI.Full 442 * @form 443 * @since 9 444 */ 445 /** 446 * Set the start angle. Clock 0 is 0 degrees and clockwise is positive. 447 * 448 * @param { number } angle 449 * @returns { GaugeAttribute } 450 * @syscap SystemCapability.ArkUI.ArkUI.Full 451 * @crossplatform 452 * @form 453 * @since 10 454 */ 455 /** 456 * Set the start angle. Clock 0 is 0 degrees and clockwise is positive. 457 * 458 * @param { number } angle 459 * @returns { GaugeAttribute } 460 * @syscap SystemCapability.ArkUI.ArkUI.Full 461 * @crossplatform 462 * @form 463 * @atomicservice 464 * @since 11 465 */ 466 startAngle(angle: number): GaugeAttribute; 467 468 /** 469 * Sets the end angle position. Clock 0 is 0 degrees and clockwise is positive. 470 * 471 * @param { number } angle 472 * @returns { GaugeAttribute } 473 * @syscap SystemCapability.ArkUI.ArkUI.Full 474 * @since 8 475 */ 476 /** 477 * Sets the end angle position. Clock 0 is 0 degrees and clockwise is positive. 478 * 479 * @param { number } angle 480 * @returns { GaugeAttribute } 481 * @syscap SystemCapability.ArkUI.ArkUI.Full 482 * @form 483 * @since 9 484 */ 485 /** 486 * Sets the end angle position. Clock 0 is 0 degrees and clockwise is positive. 487 * 488 * @param { number } angle 489 * @returns { GaugeAttribute } 490 * @syscap SystemCapability.ArkUI.ArkUI.Full 491 * @crossplatform 492 * @form 493 * @since 10 494 */ 495 /** 496 * Sets the end angle position. Clock 0 is 0 degrees and clockwise is positive. 497 * 498 * @param { number } angle 499 * @returns { GaugeAttribute } 500 * @syscap SystemCapability.ArkUI.ArkUI.Full 501 * @crossplatform 502 * @form 503 * @atomicservice 504 * @since 11 505 */ 506 endAngle(angle: number): GaugeAttribute; 507 508 /** 509 * Set the color of the chart. You can set the solid color and segmented gradient color. 510 * 511 * @param { Array<any> } colors 512 * @returns { GaugeAttribute } 513 * @syscap SystemCapability.ArkUI.ArkUI.Full 514 * @since 8 515 */ 516 /** 517 * Set the color of the chart. You can set the solid color and segmented gradient color. 518 * 519 * @param { Array<any> } colors 520 * @returns { GaugeAttribute } 521 * @syscap SystemCapability.ArkUI.ArkUI.Full 522 * @form 523 * @since 9 524 */ 525 /** 526 * Set the color of the chart. You can set the solid color and segmented gradient color. 527 * 528 * @param { Array<[ResourceColor, number]> } colors - section colors of gauge drawing. 529 * @returns { GaugeAttribute } returns the instance of the GaugeAttribute. 530 * @syscap SystemCapability.ArkUI.ArkUI.Full 531 * @crossplatform 532 * @form 533 * @since 10 534 */ 535 /** 536 * Set the color of the chart. You can set the solid color and segmented gradient color. 537 * 538 * @param { ResourceColor | LinearGradient | Array<[ResourceColor | LinearGradient, number]> } colors - section colors of gauge drawing. 539 * @returns { GaugeAttribute } returns the instance of the GaugeAttribute. 540 * @syscap SystemCapability.ArkUI.ArkUI.Full 541 * @crossplatform 542 * @form 543 * @atomicservice 544 * @since 11 545 */ 546 colors(colors: ResourceColor | LinearGradient | Array<[ResourceColor | LinearGradient, number]>): GaugeAttribute; 547 548 /** 549 * Sets the thickness of the ring chart. 550 * 551 * @param { Length } length 552 * @returns { GaugeAttribute } 553 * @syscap SystemCapability.ArkUI.ArkUI.Full 554 * @since 8 555 */ 556 /** 557 * Sets the thickness of the ring chart. 558 * 559 * @param { Length } length 560 * @returns { GaugeAttribute } 561 * @syscap SystemCapability.ArkUI.ArkUI.Full 562 * @form 563 * @since 9 564 */ 565 /** 566 * Sets the thickness of the ring chart. 567 * 568 * @param { Length } length 569 * @returns { GaugeAttribute } 570 * @syscap SystemCapability.ArkUI.ArkUI.Full 571 * @crossplatform 572 * @form 573 * @since 10 574 */ 575 /** 576 * Sets the thickness of the ring chart. 577 * 578 * @param { Length } length 579 * @returns { GaugeAttribute } 580 * @syscap SystemCapability.ArkUI.ArkUI.Full 581 * @crossplatform 582 * @form 583 * @atomicservice 584 * @since 11 585 */ 586 strokeWidth(length: Length): GaugeAttribute; 587 588 /** 589 * Sets description content of the ring chart. 590 * 591 * @param { CustomBuilder } value - description content builder of the gauge drawing. 592 * @returns { GaugeAttribute } returns the instance of the GaugeAttribute. 593 * @syscap SystemCapability.ArkUI.ArkUI.Full 594 * @crossplatform 595 * @since 11 596 */ 597 /** 598 * Sets description content of the ring chart. 599 * 600 * @param { CustomBuilder } value - description content builder of the gauge drawing. 601 * @returns { GaugeAttribute } returns the instance of the GaugeAttribute. 602 * @syscap SystemCapability.ArkUI.ArkUI.Full 603 * @crossplatform 604 * @atomicservice 605 * @since 12 606 */ 607 description(value: CustomBuilder): GaugeAttribute; 608 609 /** 610 * Sets track shadow of the ring chart. 611 * 612 * @param { GaugeShadowOptions } value - track shadow options of the gauge drawing. 613 * @returns { GaugeAttribute } returns the instance of the GaugeAttribute. 614 * @syscap SystemCapability.ArkUI.ArkUI.Full 615 * @crossplatform 616 * @since 11 617 */ 618 /** 619 * Sets track shadow of the ring chart. 620 * 621 * @param { GaugeShadowOptions } value - track shadow options of the gauge drawing. 622 * @returns { GaugeAttribute } returns the instance of the GaugeAttribute. 623 * @syscap SystemCapability.ArkUI.ArkUI.Full 624 * @crossplatform 625 * @atomicservice 626 * @since 12 627 */ 628 trackShadow(value: GaugeShadowOptions): GaugeAttribute; 629 630 /** 631 * Sets indicator options of the ring chart. 632 * 633 * @param { GaugeIndicatorOptions } value - indicator options of the gauge drawing. 634 * @returns { GaugeAttribute } returns the instance of the GaugeAttribute. 635 * @syscap SystemCapability.ArkUI.ArkUI.Full 636 * @crossplatform 637 * @since 11 638 */ 639 /** 640 * Sets indicator options of the ring chart. 641 * 642 * @param { GaugeIndicatorOptions } value - indicator options of the gauge drawing. 643 * @returns { GaugeAttribute } returns the instance of the GaugeAttribute. 644 * @syscap SystemCapability.ArkUI.ArkUI.Full 645 * @crossplatform 646 * @atomicservice 647 * @since 12 648 */ 649 indicator(value: GaugeIndicatorOptions): GaugeAttribute; 650 651 /** 652 * Sets if mark to privacy sensitive. 653 * 654 * @param { Optional<boolean> } isPrivacySensitiveMode - indicates if mark to privacy sensitive . 655 * @returns { GaugeAttribute } returns the instance of the GaugeAttribute. 656 * @syscap SystemCapability.ArkUI.ArkUI.Full 657 * @crossplatform 658 * @form 659 * @atomicservice 660 * @since 12 661 */ 662 privacySensitive(isPrivacySensitiveMode: Optional<boolean>): GaugeAttribute; 663 664 /** 665 * Set the content modifier of gauge. 666 * 667 * @param { ContentModifier<GaugeConfiguration> } modifier - The content modifier of gauge. 668 * @returns { GaugeAttribute } 669 * @syscap SystemCapability.ArkUI.ArkUI.Full 670 * @crossplatform 671 * @atomicservice 672 * @since 12 673 */ 674 contentModifier(modifier: ContentModifier<GaugeConfiguration>): GaugeAttribute; 675} 676 677/** 678 * Defines Gauge Component. 679 * 680 * @syscap SystemCapability.ArkUI.ArkUI.Full 681 * @since 8 682 */ 683/** 684 * Defines Gauge Component. 685 * 686 * @syscap SystemCapability.ArkUI.ArkUI.Full 687 * @form 688 * @since 9 689 */ 690/** 691 * Defines Gauge Component. 692 * 693 * @syscap SystemCapability.ArkUI.ArkUI.Full 694 * @crossplatform 695 * @form 696 * @since 10 697 */ 698/** 699 * Defines Gauge Component. 700 * 701 * @syscap SystemCapability.ArkUI.ArkUI.Full 702 * @crossplatform 703 * @form 704 * @atomicservice 705 * @since 11 706 */ 707declare const Gauge: GaugeInterface; 708 709/** 710 * Defines Gauge Component instance. 711 * 712 * @syscap SystemCapability.ArkUI.ArkUI.Full 713 * @since 8 714 */ 715/** 716 * Defines Gauge Component instance. 717 * 718 * @syscap SystemCapability.ArkUI.ArkUI.Full 719 * @form 720 * @since 9 721 */ 722/** 723 * Defines Gauge Component instance. 724 * 725 * @syscap SystemCapability.ArkUI.ArkUI.Full 726 * @crossplatform 727 * @form 728 * @since 10 729 */ 730/** 731 * Defines Gauge Component instance. 732 * 733 * @syscap SystemCapability.ArkUI.ArkUI.Full 734 * @crossplatform 735 * @form 736 * @atomicservice 737 * @since 11 738 */ 739declare const GaugeInstance: GaugeAttribute; 740 741