lit-litelements 2.0.2 → 2.0.3

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.
@@ -1,6 +1,7 @@
1
1
  import { LitElement } from "lit";
2
2
  declare class ChartElement extends LitElement {
3
3
  stockData: any[];
4
+ constructor();
4
5
  firstUpdated(): void;
5
6
  customLinePlugin: {
6
7
  id: string;
@@ -12,7 +12,7 @@ import Chart from "chart.js/auto";
12
12
  import { customElement, property } from "lit/decorators.js";
13
13
  let ChartElement = class ChartElement extends LitElement {
14
14
  constructor() {
15
- super(...arguments);
15
+ super();
16
16
  this.stockData = [];
17
17
  // Define the custom plugin
18
18
  this.customLinePlugin = {
@@ -36,6 +36,66 @@ let ChartElement = class ChartElement extends LitElement {
36
36
  }
37
37
  }
38
38
  };
39
+ this.stockData = [{
40
+ "date": "2024-10-24T00:00:00.000Z",
41
+ "open": 244.68,
42
+ "high": 262.12,
43
+ "low": 242.65,
44
+ "close": 260.48,
45
+ "volume": 200843843,
46
+ "MA20": 235.77,
47
+ "MA50": 229.47,
48
+ "MA200": 201.4,
49
+ "RSI": 50.203705292049065,
50
+ "MACDLine": -13.113717948717948,
51
+ "SignalLine": -0.5884189962918955,
52
+ "MACDHistogram": -12.525298952426052
53
+ },
54
+ {
55
+ "date": "2024-10-23T00:00:00.000Z",
56
+ "open": 217.13,
57
+ "high": 218.72,
58
+ "low": 212.11,
59
+ "close": 213.65,
60
+ "volume": 80938900,
61
+ "MA20": 235.46,
62
+ "MA50": 228.29,
63
+ "MA200": 201.27,
64
+ "RSI": 54.792815942211284,
65
+ "MACDLine": -9.373233618233627,
66
+ "SignalLine": 2.7094568654765374,
67
+ "MACDHistogram": -12.082690483710165
68
+ },
69
+ {
70
+ "date": "2024-10-22T00:00:00.000Z",
71
+ "open": 217.31,
72
+ "high": 218.22,
73
+ "low": 215.26,
74
+ "close": 217.97,
75
+ "volume": 43268741,
76
+ "MA20": 237.63,
77
+ "MA50": 228.17,
78
+ "MA200": 201.4,
79
+ "RSI": 50.357395263543246,
80
+ "MACDLine": -6.752931266791677,
81
+ "SignalLine": 5.664828109287326,
82
+ "MACDHistogram": -12.417759376079003
83
+ },
84
+ {
85
+ "date": "2024-10-21T00:00:00.000Z",
86
+ "open": 218.9,
87
+ "high": 220.48,
88
+ "low": 215.73,
89
+ "close": 218.85,
90
+ "volume": 47329000,
91
+ "MA20": 239.44,
92
+ "MA50": 227.76,
93
+ "MA200": 201.5,
94
+ "RSI": 46.03685770793461,
95
+ "MACDLine": -2.9715213758694574,
96
+ "SignalLine": 8.37367596470999,
97
+ "MACDHistogram": -11.345197340579448
98
+ },];
39
99
  }
40
100
  // First updated is called after the element has been rendered into the DOM
41
101
  firstUpdated() {
@@ -78,6 +138,7 @@ let ChartElement = class ChartElement extends LitElement {
78
138
  fill: false,
79
139
  borderWidth: 2,
80
140
  yAxisID: "yMACD",
141
+ hidden: true,
81
142
  },
82
143
  {
83
144
  label: "SignalLine",
@@ -87,6 +148,7 @@ let ChartElement = class ChartElement extends LitElement {
87
148
  fill: false,
88
149
  borderWidth: 1,
89
150
  yAxisID: "yMACD",
151
+ hidden: true,
90
152
  },
91
153
  {
92
154
  label: "MACDLine",
@@ -96,6 +158,7 @@ let ChartElement = class ChartElement extends LitElement {
96
158
  fill: false,
97
159
  borderWidth: 1,
98
160
  yAxisID: "yMACD",
161
+ hidden: true,
99
162
  },
100
163
  {
101
164
  label: "Close Price",
@@ -175,5 +238,6 @@ __decorate([
175
238
  __metadata("design:type", Object)
176
239
  ], ChartElement.prototype, "stockData", void 0);
177
240
  ChartElement = __decorate([
178
- customElement("stock-chart-display")
241
+ customElement("stock-chart-display"),
242
+ __metadata("design:paramtypes", [])
179
243
  ], ChartElement);