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