another chart fix
This commit is contained in:
@@ -47,10 +47,13 @@ function formatTick(value) {
|
||||
}
|
||||
|
||||
function series(points, key) {
|
||||
return points.map((p) => ({
|
||||
x: p.ts,
|
||||
return points.map((p) => {
|
||||
const t = new Date(p.ts).getTime();
|
||||
return {
|
||||
x: Number.isNaN(t) ? null : t,
|
||||
y: p[key] === undefined ? null : p[key],
|
||||
}));
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
function filterRange(points, start, end) {
|
||||
@@ -197,8 +200,8 @@ function baseOptions(range) {
|
||||
maxTicksLimit: 6,
|
||||
callback: (value) => formatTick(value),
|
||||
},
|
||||
min: range && range.axisStart ? range.axisStart : undefined,
|
||||
max: range && range.axisEnd ? range.axisEnd : undefined,
|
||||
min: range && range.axisStart ? range.axisStart.getTime() : undefined,
|
||||
max: range && range.axisEnd ? range.axisEnd.getTime() : undefined,
|
||||
grid: { color: "rgba(123, 223, 242, 0.08)" },
|
||||
},
|
||||
y: {
|
||||
|
||||
Reference in New Issue
Block a user