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