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 type 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 * @interface DataPanelShadowOptions 211 * @syscap SystemCapability.ArkUI.ArkUI.Full 212 * @crossplatform 213 * @since 10 214 */ 215/** 216 * Defines the options of Shadow. 217 * 218 * @interface DataPanelShadowOptions 219 * @syscap SystemCapability.ArkUI.ArkUI.Full 220 * @crossplatform 221 * @atomicservice 222 * @since 11 223 */ 224declare interface DataPanelShadowOptions extends MultiShadowOptions { 225 /** 226 * Current shadow colors. 227 * 228 * @type { ?Array<ResourceColor | LinearGradient> } 229 * @default Consistent with valueColors 230 * @syscap SystemCapability.ArkUI.ArkUI.Full 231 * @crossplatform 232 * @since 10 233 */ 234 /** 235 * Current shadow colors. 236 * 237 * @type { ?Array<ResourceColor | LinearGradient> } 238 * @default Consistent with valueColors 239 * @syscap SystemCapability.ArkUI.ArkUI.Full 240 * @crossplatform 241 * @atomicservice 242 * @since 11 243 */ 244 colors?: Array<ResourceColor | LinearGradient>; 245} 246 247/** 248 * Defines the options of DataPanel. 249 * 250 * @interface DataPanelOptions 251 * @syscap SystemCapability.ArkUI.ArkUI.Full 252 * @since 7 253 */ 254/** 255 * Defines the options of DataPanel. 256 * 257 * @interface DataPanelOptions 258 * @syscap SystemCapability.ArkUI.ArkUI.Full 259 * @form 260 * @since 9 261 */ 262/** 263 * Defines the options of DataPanel. 264 * 265 * @interface DataPanelOptions 266 * @syscap SystemCapability.ArkUI.ArkUI.Full 267 * @crossplatform 268 * @form 269 * @since 10 270 */ 271/** 272 * Defines the options of DataPanel. 273 * 274 * @interface DataPanelOptions 275 * @syscap SystemCapability.ArkUI.ArkUI.Full 276 * @crossplatform 277 * @form 278 * @atomicservice 279 * @since 11 280 */ 281declare interface DataPanelOptions { 282 /** 283 * Current data value. the max length is 9. 284 * 285 * @type { number[] } 286 * @syscap SystemCapability.ArkUI.ArkUI.Full 287 * @since 7 288 */ 289 /** 290 * Current data value. the max length is 9. 291 * 292 * @type { number[] } 293 * @syscap SystemCapability.ArkUI.ArkUI.Full 294 * @form 295 * @since 9 296 */ 297 /** 298 * Current data value. the max length is 9. 299 * 300 * @type { number[] } 301 * @syscap SystemCapability.ArkUI.ArkUI.Full 302 * @crossplatform 303 * @form 304 * @since 10 305 */ 306 /** 307 * Current data value. the max length is 9. 308 * 309 * @type { number[] } 310 * @syscap SystemCapability.ArkUI.ArkUI.Full 311 * @crossplatform 312 * @form 313 * @atomicservice 314 * @since 11 315 */ 316 values: number[]; 317 318 /** 319 * Maximum value of the current data. 320 * 321 * @type { ?number } 322 * @syscap SystemCapability.ArkUI.ArkUI.Full 323 * @since 7 324 */ 325 /** 326 * Maximum value of the current data. 327 * 328 * @type { ?number } 329 * @syscap SystemCapability.ArkUI.ArkUI.Full 330 * @form 331 * @since 9 332 */ 333 /** 334 * Maximum value of the current data. 335 * 336 * @type { ?number } 337 * @syscap SystemCapability.ArkUI.ArkUI.Full 338 * @crossplatform 339 * @form 340 * @since 10 341 */ 342 /** 343 * Maximum value of the current data. 344 * 345 * @type { ?number } 346 * @syscap SystemCapability.ArkUI.ArkUI.Full 347 * @crossplatform 348 * @form 349 * @atomicservice 350 * @since 11 351 */ 352 max?: number; 353 354 /** 355 * DataPanel Type 356 * 357 * @type { ?DataPanelType } 358 * @syscap SystemCapability.ArkUI.ArkUI.Full 359 * @since 8 360 */ 361 /** 362 * DataPanel Type 363 * 364 * @type { ?DataPanelType } 365 * @syscap SystemCapability.ArkUI.ArkUI.Full 366 * @form 367 * @since 9 368 */ 369 /** 370 * DataPanel Type 371 * 372 * @type { ?DataPanelType } 373 * @syscap SystemCapability.ArkUI.ArkUI.Full 374 * @crossplatform 375 * @form 376 * @since 10 377 */ 378 /** 379 * DataPanel Type 380 * 381 * @type { ?DataPanelType } 382 * @syscap SystemCapability.ArkUI.ArkUI.Full 383 * @crossplatform 384 * @form 385 * @atomicservice 386 * @since 11 387 */ 388 type?: DataPanelType; 389} 390 391/** 392 * Defines the DataPanel component. 393 * 394 * @interface DataPanelInterface 395 * @syscap SystemCapability.ArkUI.ArkUI.Full 396 * @since 7 397 */ 398/** 399 * Defines the DataPanel component. 400 * 401 * @interface DataPanelInterface 402 * @syscap SystemCapability.ArkUI.ArkUI.Full 403 * @form 404 * @since 9 405 */ 406/** 407 * Defines the DataPanel component. 408 * 409 * @interface DataPanelInterface 410 * @syscap SystemCapability.ArkUI.ArkUI.Full 411 * @crossplatform 412 * @form 413 * @since 10 414 */ 415/** 416 * Defines the DataPanel component. 417 * 418 * @interface DataPanelInterface 419 * @syscap SystemCapability.ArkUI.ArkUI.Full 420 * @crossplatform 421 * @form 422 * @atomicservice 423 * @since 11 424 */ 425interface DataPanelInterface { 426 /** 427 * Return a DataPanel. 428 * 429 * @param { DataPanelOptions } options 430 * @returns { DataPanelAttribute } 431 * @syscap SystemCapability.ArkUI.ArkUI.Full 432 * @since 7 433 */ 434 /** 435 * Return a DataPanel. 436 * 437 * @param { DataPanelOptions } options 438 * @returns { DataPanelAttribute } 439 * @syscap SystemCapability.ArkUI.ArkUI.Full 440 * @form 441 * @since 9 442 */ 443 /** 444 * Return a DataPanel. 445 * 446 * @param { DataPanelOptions } options 447 * @returns { DataPanelAttribute } 448 * @syscap SystemCapability.ArkUI.ArkUI.Full 449 * @crossplatform 450 * @form 451 * @since 10 452 */ 453 /** 454 * Return a DataPanel. 455 * 456 * @param { DataPanelOptions } options 457 * @returns { DataPanelAttribute } 458 * @syscap SystemCapability.ArkUI.ArkUI.Full 459 * @crossplatform 460 * @form 461 * @atomicservice 462 * @since 11 463 */ 464 (options: DataPanelOptions): DataPanelAttribute; 465} 466 467/** 468 * DataPanelConfiguration used by dataPanel content modifier 469 * 470 * @interface DataPanelConfiguration 471 * @syscap SystemCapability.ArkUI.ArkUI.Full 472 * @crossplatform 473 * @atomicservice 474 * @since 12 475 */ 476declare interface DataPanelConfiguration extends CommonConfiguration<DataPanelConfiguration> { 477 /** 478 * Current data value. the max length is 9. 479 * 480 * @type { number[] } 481 * @syscap SystemCapability.ArkUI.ArkUI.Full 482 * @crossplatform 483 * @atomicservice 484 * @since 12 485 */ 486 values: number[]; 487 488 /** 489 * Maximum value of the current data. 490 * 491 * @type { number } 492 * @syscap SystemCapability.ArkUI.ArkUI.Full 493 * @crossplatform 494 * @atomicservice 495 * @since 12 496 */ 497 maxValue: number; 498} 499 500/** 501 * Defines the DataPanel attribute functions. 502 * 503 * @extends CommonMethod 504 * @syscap SystemCapability.ArkUI.ArkUI.Full 505 * @since 7 506 */ 507/** 508 * Defines the DataPanel attribute functions. 509 * 510 * @extends CommonMethod 511 * @syscap SystemCapability.ArkUI.ArkUI.Full 512 * @form 513 * @since 9 514 */ 515/** 516 * Defines the DataPanel attribute functions. 517 * 518 * @extends CommonMethod 519 * @syscap SystemCapability.ArkUI.ArkUI.Full 520 * @crossplatform 521 * @form 522 * @since 10 523 */ 524/** 525 * Defines the DataPanel attribute functions. 526 * 527 * @extends CommonMethod<DataPanelAttribute> 528 * @syscap SystemCapability.ArkUI.ArkUI.Full 529 * @crossplatform 530 * @form 531 * @atomicservice 532 * @since 11 533 */ 534declare class DataPanelAttribute extends CommonMethod<DataPanelAttribute> { 535 /** 536 * Disable the special effect of the data ratio chart. 537 * 538 * @param { boolean } value 539 * @returns { DataPanelAttribute } 540 * @syscap SystemCapability.ArkUI.ArkUI.Full 541 * @since 7 542 */ 543 /** 544 * Disable the special effect of the data ratio chart. 545 * 546 * @param { boolean } value 547 * @returns { DataPanelAttribute } 548 * @syscap SystemCapability.ArkUI.ArkUI.Full 549 * @form 550 * @since 9 551 */ 552 /** 553 * Disable the special effect of the data ratio chart. 554 * 555 * @param { boolean } value 556 * @returns { DataPanelAttribute } 557 * @syscap SystemCapability.ArkUI.ArkUI.Full 558 * @crossplatform 559 * @form 560 * @since 10 561 */ 562 /** 563 * Disable the special effect of the data ratio chart. 564 * 565 * @param { boolean } value 566 * @returns { DataPanelAttribute } 567 * @syscap SystemCapability.ArkUI.ArkUI.Full 568 * @crossplatform 569 * @form 570 * @atomicservice 571 * @since 11 572 */ 573 closeEffect(value: boolean): DataPanelAttribute; 574 575 /** 576 * Set the value colors of the data ratio chart. 577 * 578 * @param { Array<ResourceColor | LinearGradient> } value - the value colors of the data ratio chart. 579 * @returns { DataPanelAttribute } 580 * @syscap SystemCapability.ArkUI.ArkUI.Full 581 * @crossplatform 582 * @since 10 583 */ 584 /** 585 * Set the value colors of the data ratio chart. 586 * 587 * @param { Array<ResourceColor | LinearGradient> } value - the value colors of the data ratio chart. 588 * @returns { DataPanelAttribute } 589 * @syscap SystemCapability.ArkUI.ArkUI.Full 590 * @crossplatform 591 * @atomicservice 592 * @since 11 593 */ 594 valueColors(value: Array<ResourceColor | LinearGradient>): DataPanelAttribute; 595 596 /** 597 * Set track background color of the data ratio chart. 598 * 599 * @param { ResourceColor } value - track background color of the data ratio chart. 600 * @returns { DataPanelAttribute } 601 * @syscap SystemCapability.ArkUI.ArkUI.Full 602 * @crossplatform 603 * @since 10 604 */ 605 /** 606 * Set track background color of the data ratio chart. 607 * 608 * @param { ResourceColor } value - track background color of the data ratio chart. 609 * @returns { DataPanelAttribute } 610 * @syscap SystemCapability.ArkUI.ArkUI.Full 611 * @crossplatform 612 * @atomicservice 613 * @since 11 614 */ 615 trackBackgroundColor(value: ResourceColor): DataPanelAttribute; 616 617 /** 618 * Set the stroke width of the data ratio chart. 619 * 620 * @param { Length } value - the stroke width of the data ratio chart. 621 * @returns { DataPanelAttribute } 622 * @syscap SystemCapability.ArkUI.ArkUI.Full 623 * @crossplatform 624 * @since 10 625 */ 626 /** 627 * Set the stroke width of the data ratio chart. 628 * 629 * @param { Length } value - the stroke width of the data ratio chart. 630 * @returns { DataPanelAttribute } 631 * @syscap SystemCapability.ArkUI.ArkUI.Full 632 * @crossplatform 633 * @atomicservice 634 * @since 11 635 */ 636 strokeWidth(value: Length): DataPanelAttribute; 637 638 /** 639 * Set the shadow width of the data ratio chart. 640 * 641 * @param { DataPanelShadowOptions } value - the track shadow width of the data ratio chart. 642 * @returns { DataPanelAttribute } 643 * @syscap SystemCapability.ArkUI.ArkUI.Full 644 * @crossplatform 645 * @since 10 646 */ 647 /** 648 * Set the shadow width of the data ratio chart. 649 * 650 * @param { DataPanelShadowOptions } value - the track shadow width of the data ratio chart. 651 * @returns { DataPanelAttribute } 652 * @syscap SystemCapability.ArkUI.ArkUI.Full 653 * @crossplatform 654 * @atomicservice 655 * @since 11 656 */ 657 trackShadow(value: DataPanelShadowOptions): DataPanelAttribute; 658 659 /** 660 * Set the content modifier of data panel. 661 * 662 * @param { ContentModifier<DataPanelConfiguration> } modifier - The content modifier of data panel. 663 * @returns { DataPanelAttribute } 664 * @syscap SystemCapability.ArkUI.ArkUI.Full 665 * @crossplatform 666 * @atomicservice 667 * @since 12 668 */ 669 contentModifier(modifier: ContentModifier<DataPanelConfiguration>): DataPanelAttribute; 670} 671 672/** 673 * Defines DataPanel Component. 674 * 675 * @syscap SystemCapability.ArkUI.ArkUI.Full 676 * @since 7 677 */ 678/** 679 * Defines DataPanel Component. 680 * 681 * @syscap SystemCapability.ArkUI.ArkUI.Full 682 * @form 683 * @since 9 684 */ 685/** 686 * Defines DataPanel Component. 687 * 688 * @syscap SystemCapability.ArkUI.ArkUI.Full 689 * @crossplatform 690 * @form 691 * @since 10 692 */ 693/** 694 * Defines DataPanel Component. 695 * 696 * @syscap SystemCapability.ArkUI.ArkUI.Full 697 * @crossplatform 698 * @form 699 * @atomicservice 700 * @since 11 701 */ 702declare const DataPanel: DataPanelInterface 703 704/** 705 * Defines DataPanel Component instance. 706 * 707 * @syscap SystemCapability.ArkUI.ArkUI.Full 708 * @since 7 709 */ 710/** 711 * Defines DataPanel Component instance. 712 * 713 * @syscap SystemCapability.ArkUI.ArkUI.Full 714 * @form 715 * @since 9 716 */ 717/** 718 * Defines DataPanel Component instance. 719 * 720 * @syscap SystemCapability.ArkUI.ArkUI.Full 721 * @crossplatform 722 * @form 723 * @since 10 724 */ 725/** 726 * Defines DataPanel Component instance. 727 * 728 * @syscap SystemCapability.ArkUI.ArkUI.Full 729 * @crossplatform 730 * @form 731 * @atomicservice 732 * @since 11 733 */ 734declare const DataPanelInstance: DataPanelAttribute; 735