@carbon/charts 1.3.2 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/build/demo/create-codesandbox.d.ts +0 -2
  3. package/build/demo/data/bar.d.ts +18 -0
  4. package/build/src/interfaces/charts.d.ts +5 -1
  5. package/build/src/interfaces/enums.d.ts +1 -1
  6. package/build/src/services/time-series.d.ts +415 -0
  7. package/bundle.js +1 -1
  8. package/components/essentials/tooltip.js +9 -0
  9. package/components/essentials/tooltip.js.map +1 -1
  10. package/configuration.js +2 -1
  11. package/configuration.js.map +1 -1
  12. package/demo/create-codesandbox.d.ts +0 -2
  13. package/demo/create-codesandbox.js +5 -7
  14. package/demo/create-codesandbox.js.map +1 -1
  15. package/demo/data/bar.d.ts +18 -0
  16. package/demo/data/bar.js +35 -0
  17. package/demo/data/bar.js.map +1 -1
  18. package/demo/data/bundle.js +1 -1
  19. package/demo/data/index.js +5 -0
  20. package/demo/data/index.js.map +1 -1
  21. package/demo/styles.css +1 -1675
  22. package/demo/styles.css.map +1 -1
  23. package/demo/styles.min.css +1 -1
  24. package/demo/styles.min.css.map +1 -1
  25. package/demo/tsconfig.tsbuildinfo +6 -6
  26. package/demo/utils.js +14 -5
  27. package/demo/utils.js.map +1 -1
  28. package/interfaces/charts.d.ts +5 -1
  29. package/interfaces/charts.js.map +1 -1
  30. package/interfaces/enums.d.ts +1 -1
  31. package/interfaces/enums.js +1 -1
  32. package/interfaces/enums.js.map +1 -1
  33. package/model/model.js +8 -1
  34. package/model/model.js.map +1 -1
  35. package/package.json +1 -1
  36. package/services/essentials/dom-utils.js +5 -3
  37. package/services/essentials/dom-utils.js.map +1 -1
  38. package/services/time-series.d.ts +1 -0
  39. package/services/time-series.js +13 -0
  40. package/services/time-series.js.map +1 -1
  41. package/tsconfig.tsbuildinfo +76 -75
package/CHANGELOG.md CHANGED
@@ -3,6 +3,39 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.5.1](https://github.com/carbon-design-system/carbon-charts/compare/v1.5.0...v1.5.1) (2022-08-08)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * show correct time format in ticks with milliseconds ([#1419](https://github.com/carbon-design-system/carbon-charts/issues/1419)) ([d527f05](https://github.com/carbon-design-system/carbon-charts/commit/d527f052d3307be80f7e218f7df832c1bb04c92c))
12
+
13
+
14
+
15
+
16
+
17
+ # [1.5.0](https://github.com/carbon-design-system/carbon-charts/compare/v1.4.0...v1.5.0) (2022-07-22)
18
+
19
+
20
+ ### Features
21
+
22
+ * **core:** Show milliseconds in axis labels if necessary ([#1408](https://github.com/carbon-design-system/carbon-charts/issues/1408)) ([d754ca6](https://github.com/carbon-design-system/carbon-charts/commit/d754ca6494fc2138976c89cb338e72193a4e7bf0))
23
+
24
+
25
+
26
+
27
+
28
+ # [1.4.0](https://github.com/carbon-design-system/carbon-charts/compare/v1.3.2...v1.4.0) (2022-07-21)
29
+
30
+
31
+ ### Features
32
+
33
+ * **core:** allow theme to be set via options prop ([#1412](https://github.com/carbon-design-system/carbon-charts/issues/1412)) ([6288548](https://github.com/carbon-design-system/carbon-charts/commit/62885487a700e2222d51f70aea790eddd5d6d086)), closes [#1411](https://github.com/carbon-design-system/carbon-charts/issues/1411)
34
+
35
+
36
+
37
+
38
+
6
39
  ## [1.3.2](https://github.com/carbon-design-system/carbon-charts/compare/v1.3.1...v1.3.2) (2022-06-30)
7
40
 
8
41
 
@@ -98,9 +98,7 @@ export declare const createSvelteChartApp: {
98
98
  '@carbon/charts-svelte': any;
99
99
  '@sveltejs/vite-plugin-svelte': string;
100
100
  d3: string;
101
- sass: string;
102
101
  svelte: string;
103
- 'svelte-hmr': string;
104
102
  vite: string;
105
103
  };
106
104
  };
@@ -452,6 +452,24 @@ export declare const stackedBarTimeSeriesOptions: {
452
452
  };
453
453
  };
454
454
  };
455
+ export declare const stackedBarShortIntervalTimeSeriesData: {
456
+ group: string;
457
+ date: Date;
458
+ value: number;
459
+ }[];
460
+ export declare const stackedBarShortIntervalTimeSeriesOptions: {
461
+ title: string;
462
+ axes: {
463
+ left: {
464
+ mapsTo: string;
465
+ stacked: boolean;
466
+ };
467
+ bottom: {
468
+ mapsTo: string;
469
+ scaleType: string;
470
+ };
471
+ };
472
+ };
455
473
  export declare const stackedBarTimeSeriesDataCustomTicks: {
456
474
  group: string;
457
475
  date: Date;
@@ -1,4 +1,4 @@
1
- import { GaugeTypes, Statuses, ArrowDirections, Alignments, ChartTypes, TreeTypes, DividerStatus, ColorLegendType } from './enums';
1
+ import { GaugeTypes, Statuses, ArrowDirections, Alignments, ChartTypes, TreeTypes, DividerStatus, ColorLegendType, ChartTheme } from './enums';
2
2
  import { LegendOptions, TooltipOptions, GridOptions, AxesOptions, ZoomBarsOptions } from './index';
3
3
  import { BarOptions, StackedBarOptions, ToolbarOptions } from './components';
4
4
  import { AxisOptions, BinnedAxisOptions, TimeScaleOptions } from './axis-scales';
@@ -26,6 +26,10 @@ export interface BaseChartOptions {
26
26
  * Optionally specify a height for the chart
27
27
  */
28
28
  height?: string;
29
+ /**
30
+ * Optionally specify a theme for the chart
31
+ */
32
+ theme?: ChartTheme;
29
33
  /**
30
34
  * tooltip configuration
31
35
  */
@@ -8,7 +8,7 @@ export declare enum RenderTypes {
8
8
  * enum of all supported chart themes
9
9
  */
10
10
  export declare enum ChartTheme {
11
- DEFAULT = "default",
11
+ WHITE = "white",
12
12
  G100 = "g100",
13
13
  G90 = "g90",
14
14
  G10 = "g10"
@@ -370,3 +370,418 @@ export declare namespace computeTimeIntervalName {
370
370
  };
371
371
  };
372
372
  }
373
+ export declare function formatDateTillMilliSeconds(date: Date): string;
374
+ export declare namespace formatDateTillMilliSeconds {
375
+ var displayName: string;
376
+ var __docgenInfo: {
377
+ "description": string;
378
+ "displayName": string;
379
+ "props": {
380
+ "toString": {
381
+ "defaultValue": any;
382
+ "description": string;
383
+ "name": string;
384
+ "required": boolean;
385
+ "type": {
386
+ "name": string;
387
+ };
388
+ };
389
+ "toDateString": {
390
+ "defaultValue": any;
391
+ "description": string;
392
+ "name": string;
393
+ "required": boolean;
394
+ "type": {
395
+ "name": string;
396
+ };
397
+ };
398
+ "toTimeString": {
399
+ "defaultValue": any;
400
+ "description": string;
401
+ "name": string;
402
+ "required": boolean;
403
+ "type": {
404
+ "name": string;
405
+ };
406
+ };
407
+ "toLocaleString": {
408
+ "defaultValue": any;
409
+ "description": string;
410
+ "name": string;
411
+ "required": boolean;
412
+ "type": {
413
+ "name": string;
414
+ };
415
+ };
416
+ "toLocaleDateString": {
417
+ "defaultValue": any;
418
+ "description": string;
419
+ "name": string;
420
+ "required": boolean;
421
+ "type": {
422
+ "name": string;
423
+ };
424
+ };
425
+ "toLocaleTimeString": {
426
+ "defaultValue": any;
427
+ "description": string;
428
+ "name": string;
429
+ "required": boolean;
430
+ "type": {
431
+ "name": string;
432
+ };
433
+ };
434
+ "valueOf": {
435
+ "defaultValue": any;
436
+ "description": string;
437
+ "name": string;
438
+ "required": boolean;
439
+ "type": {
440
+ "name": string;
441
+ };
442
+ };
443
+ "getTime": {
444
+ "defaultValue": any;
445
+ "description": string;
446
+ "name": string;
447
+ "required": boolean;
448
+ "type": {
449
+ "name": string;
450
+ };
451
+ };
452
+ "getFullYear": {
453
+ "defaultValue": any;
454
+ "description": string;
455
+ "name": string;
456
+ "required": boolean;
457
+ "type": {
458
+ "name": string;
459
+ };
460
+ };
461
+ "getUTCFullYear": {
462
+ "defaultValue": any;
463
+ "description": string;
464
+ "name": string;
465
+ "required": boolean;
466
+ "type": {
467
+ "name": string;
468
+ };
469
+ };
470
+ "getMonth": {
471
+ "defaultValue": any;
472
+ "description": string;
473
+ "name": string;
474
+ "required": boolean;
475
+ "type": {
476
+ "name": string;
477
+ };
478
+ };
479
+ "getUTCMonth": {
480
+ "defaultValue": any;
481
+ "description": string;
482
+ "name": string;
483
+ "required": boolean;
484
+ "type": {
485
+ "name": string;
486
+ };
487
+ };
488
+ "getDate": {
489
+ "defaultValue": any;
490
+ "description": string;
491
+ "name": string;
492
+ "required": boolean;
493
+ "type": {
494
+ "name": string;
495
+ };
496
+ };
497
+ "getUTCDate": {
498
+ "defaultValue": any;
499
+ "description": string;
500
+ "name": string;
501
+ "required": boolean;
502
+ "type": {
503
+ "name": string;
504
+ };
505
+ };
506
+ "getDay": {
507
+ "defaultValue": any;
508
+ "description": string;
509
+ "name": string;
510
+ "required": boolean;
511
+ "type": {
512
+ "name": string;
513
+ };
514
+ };
515
+ "getUTCDay": {
516
+ "defaultValue": any;
517
+ "description": string;
518
+ "name": string;
519
+ "required": boolean;
520
+ "type": {
521
+ "name": string;
522
+ };
523
+ };
524
+ "getHours": {
525
+ "defaultValue": any;
526
+ "description": string;
527
+ "name": string;
528
+ "required": boolean;
529
+ "type": {
530
+ "name": string;
531
+ };
532
+ };
533
+ "getUTCHours": {
534
+ "defaultValue": any;
535
+ "description": string;
536
+ "name": string;
537
+ "required": boolean;
538
+ "type": {
539
+ "name": string;
540
+ };
541
+ };
542
+ "getMinutes": {
543
+ "defaultValue": any;
544
+ "description": string;
545
+ "name": string;
546
+ "required": boolean;
547
+ "type": {
548
+ "name": string;
549
+ };
550
+ };
551
+ "getUTCMinutes": {
552
+ "defaultValue": any;
553
+ "description": string;
554
+ "name": string;
555
+ "required": boolean;
556
+ "type": {
557
+ "name": string;
558
+ };
559
+ };
560
+ "getSeconds": {
561
+ "defaultValue": any;
562
+ "description": string;
563
+ "name": string;
564
+ "required": boolean;
565
+ "type": {
566
+ "name": string;
567
+ };
568
+ };
569
+ "getUTCSeconds": {
570
+ "defaultValue": any;
571
+ "description": string;
572
+ "name": string;
573
+ "required": boolean;
574
+ "type": {
575
+ "name": string;
576
+ };
577
+ };
578
+ "getMilliseconds": {
579
+ "defaultValue": any;
580
+ "description": string;
581
+ "name": string;
582
+ "required": boolean;
583
+ "type": {
584
+ "name": string;
585
+ };
586
+ };
587
+ "getUTCMilliseconds": {
588
+ "defaultValue": any;
589
+ "description": string;
590
+ "name": string;
591
+ "required": boolean;
592
+ "type": {
593
+ "name": string;
594
+ };
595
+ };
596
+ "getTimezoneOffset": {
597
+ "defaultValue": any;
598
+ "description": string;
599
+ "name": string;
600
+ "required": boolean;
601
+ "type": {
602
+ "name": string;
603
+ };
604
+ };
605
+ "setTime": {
606
+ "defaultValue": any;
607
+ "description": string;
608
+ "name": string;
609
+ "required": boolean;
610
+ "type": {
611
+ "name": string;
612
+ };
613
+ };
614
+ "setMilliseconds": {
615
+ "defaultValue": any;
616
+ "description": string;
617
+ "name": string;
618
+ "required": boolean;
619
+ "type": {
620
+ "name": string;
621
+ };
622
+ };
623
+ "setUTCMilliseconds": {
624
+ "defaultValue": any;
625
+ "description": string;
626
+ "name": string;
627
+ "required": boolean;
628
+ "type": {
629
+ "name": string;
630
+ };
631
+ };
632
+ "setSeconds": {
633
+ "defaultValue": any;
634
+ "description": string;
635
+ "name": string;
636
+ "required": boolean;
637
+ "type": {
638
+ "name": string;
639
+ };
640
+ };
641
+ "setUTCSeconds": {
642
+ "defaultValue": any;
643
+ "description": string;
644
+ "name": string;
645
+ "required": boolean;
646
+ "type": {
647
+ "name": string;
648
+ };
649
+ };
650
+ "setMinutes": {
651
+ "defaultValue": any;
652
+ "description": string;
653
+ "name": string;
654
+ "required": boolean;
655
+ "type": {
656
+ "name": string;
657
+ };
658
+ };
659
+ "setUTCMinutes": {
660
+ "defaultValue": any;
661
+ "description": string;
662
+ "name": string;
663
+ "required": boolean;
664
+ "type": {
665
+ "name": string;
666
+ };
667
+ };
668
+ "setHours": {
669
+ "defaultValue": any;
670
+ "description": string;
671
+ "name": string;
672
+ "required": boolean;
673
+ "type": {
674
+ "name": string;
675
+ };
676
+ };
677
+ "setUTCHours": {
678
+ "defaultValue": any;
679
+ "description": string;
680
+ "name": string;
681
+ "required": boolean;
682
+ "type": {
683
+ "name": string;
684
+ };
685
+ };
686
+ "setDate": {
687
+ "defaultValue": any;
688
+ "description": string;
689
+ "name": string;
690
+ "required": boolean;
691
+ "type": {
692
+ "name": string;
693
+ };
694
+ };
695
+ "setUTCDate": {
696
+ "defaultValue": any;
697
+ "description": string;
698
+ "name": string;
699
+ "required": boolean;
700
+ "type": {
701
+ "name": string;
702
+ };
703
+ };
704
+ "setMonth": {
705
+ "defaultValue": any;
706
+ "description": string;
707
+ "name": string;
708
+ "required": boolean;
709
+ "type": {
710
+ "name": string;
711
+ };
712
+ };
713
+ "setUTCMonth": {
714
+ "defaultValue": any;
715
+ "description": string;
716
+ "name": string;
717
+ "required": boolean;
718
+ "type": {
719
+ "name": string;
720
+ };
721
+ };
722
+ "setFullYear": {
723
+ "defaultValue": any;
724
+ "description": string;
725
+ "name": string;
726
+ "required": boolean;
727
+ "type": {
728
+ "name": string;
729
+ };
730
+ };
731
+ "setUTCFullYear": {
732
+ "defaultValue": any;
733
+ "description": string;
734
+ "name": string;
735
+ "required": boolean;
736
+ "type": {
737
+ "name": string;
738
+ };
739
+ };
740
+ "toUTCString": {
741
+ "defaultValue": any;
742
+ "description": string;
743
+ "name": string;
744
+ "required": boolean;
745
+ "type": {
746
+ "name": string;
747
+ };
748
+ };
749
+ "toISOString": {
750
+ "defaultValue": any;
751
+ "description": string;
752
+ "name": string;
753
+ "required": boolean;
754
+ "type": {
755
+ "name": string;
756
+ };
757
+ };
758
+ "toJSON": {
759
+ "defaultValue": any;
760
+ "description": string;
761
+ "name": string;
762
+ "required": boolean;
763
+ "type": {
764
+ "name": string;
765
+ };
766
+ };
767
+ "getVarDate": {
768
+ "defaultValue": any;
769
+ "description": string;
770
+ "name": string;
771
+ "required": boolean;
772
+ "type": {
773
+ "name": string;
774
+ };
775
+ };
776
+ "__@toPrimitive": {
777
+ "defaultValue": any;
778
+ "description": string;
779
+ "name": string;
780
+ "required": boolean;
781
+ "type": {
782
+ "name": string;
783
+ };
784
+ };
785
+ };
786
+ };
787
+ }