@operato/chart 7.0.39 → 7.0.41

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.
package/stories/common.ts CHANGED
@@ -56,7 +56,10 @@ export function getDefaultAxisOptions(): OperatoChart.AxisOptions {
56
56
  // { timestamp: 2016, count: 28, average: 90 }
57
57
  // ]
58
58
  // 랜덤한 범위의 숫자를 생성하는 함수
59
- function getRandomInRange(min: number, max: number) {
59
+ function getRandomInRange(i: number, min: number, max: number) {
60
+ if (!(i % 11)) {
61
+ return null
62
+ }
60
63
  return Math.floor(Math.random() * (max - min + 1)) + min
61
64
  }
62
65
 
@@ -67,8 +70,8 @@ function generateRandomData(count: number) {
67
70
 
68
71
  for (let i = 0; i < count; i++) {
69
72
  const timestamp = startTimestamp + i * 360 * 30 * 1000 // 3초씩 증가하는 타임스탬프 설정
70
- const randomCount = getRandomInRange(5, 35) // count 값을 5에서 35 사이로 랜덤 생성
71
- const randomAverage = getRandomInRange(50, 150) // average 값을 50에서 150 사이로 랜덤 생성
73
+ const randomCount = getRandomInRange(i, 5, 35) // count 값을 5에서 35 사이로 랜덤 생성
74
+ const randomAverage = getRandomInRange(i, 50, 150) // average 값을 50에서 150 사이로 랜덤 생성
72
75
 
73
76
  randomData.push({
74
77
  timestamp: timestamp,
@@ -121,14 +121,14 @@ WithData.args = {
121
121
  datasets: [
122
122
  {
123
123
  dataKey: 'count',
124
- label: 'Line Series count',
124
+ label: '라인 시리즈 카운트',
125
125
  type: 'line',
126
126
  color: 'rgba(255, 99, 132, 1)',
127
127
  borderWidth: 1
128
128
  },
129
129
  {
130
130
  dataKey: 'average',
131
- label: 'Line Series average',
131
+ label: '라인 시리즈 평균값',
132
132
  type: 'line',
133
133
  color: 'rgba(54, 162, 235, 1)',
134
134
  fill: false,