@operato/chart 7.0.1 → 7.0.2

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.
@@ -105,7 +105,7 @@ const Template: Story<ArgTypes> = ({ value }: ArgTypes) => html`
105
105
  ></ox-input-chart-timeseries>
106
106
  <div id="charts">
107
107
  <ox-scichart id="scichart" .data=${data} attr-x="timestamp" attr-y="count"></ox-scichart>
108
- <ox-chart-js id="chartjs" .data=${data}></ox-chart-js>
108
+ <!-- <ox-chart-js id="chartjs" .data=${data}></ox-chart-js> -->
109
109
  </div>
110
110
  </div>
111
111
  `
@@ -141,8 +141,22 @@ WithData.args = {
141
141
  },
142
142
  options: {
143
143
  scales: {
144
- xAxes: [{ ticks: { beginAtZero: true } }],
145
- yAxes: [{ ticks: { beginAtZero: true } }]
144
+ xAxes: [
145
+ {
146
+ axisTitle: 'timestamp',
147
+ ticks: { beginAtZero: true }
148
+ }
149
+ ],
150
+ yAxes: [
151
+ {
152
+ axisTitle: 'count',
153
+ ticks: { beginAtZero: true }
154
+ },
155
+ {
156
+ axisTitle: 'average',
157
+ ticks: { beginAtZero: true }
158
+ }
159
+ ]
146
160
  },
147
161
  legend: { display: true }
148
162
  }
@@ -153,16 +167,13 @@ export const MultiAxis = Template.bind({})
153
167
  MultiAxis.args = {
154
168
  value: {
155
169
  ...getDefaultChartConfig('line'),
156
- options: {
157
- ...getDefaultChartConfig('line').options,
158
- multiAxis: true
159
- },
160
170
  data: {
161
171
  datasets: [
162
172
  {
163
173
  label: 'Bar Series',
164
174
  type: 'bar',
165
175
  dataKey: 'count',
176
+ axisTitle: 'count',
166
177
  backgroundColor: 'rgba(255, 99, 132, 0.2)',
167
178
  borderColor: 'rgba(255, 99, 132, 1)',
168
179
  borderWidth: 1,
@@ -172,16 +183,39 @@ MultiAxis.args = {
172
183
  label: 'Line Series',
173
184
  type: 'line',
174
185
  dataKey: 'average',
186
+ axisTitle: 'average',
175
187
  color: 'rgba(54, 162, 235, 1)',
176
188
  borderWidth: 1,
177
189
  fill: false,
178
190
  lineTension: 0.4,
179
- pointStyle: 'circle',
191
+ pointStyle: 'rect',
180
192
  pointRadius: 3,
181
193
  yAxisID: 'right'
182
194
  }
183
195
  ],
184
196
  labelDataKey: 'timestamp'
197
+ },
198
+ options: {
199
+ scales: {
200
+ xAxes: [
201
+ {
202
+ axisTitle: 'timestamp',
203
+ ticks: { beginAtZero: true }
204
+ }
205
+ ],
206
+ yAxes: [
207
+ {
208
+ axisTitle: 'count',
209
+ ticks: { beginAtZero: true }
210
+ },
211
+ {
212
+ axisTitle: 'average',
213
+ ticks: { beginAtZero: true }
214
+ }
215
+ ]
216
+ },
217
+ multiAxis: true,
218
+ legend: { display: true }
185
219
  }
186
220
  }
187
221
  }