mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
linting
This commit is contained in:
parent
67d7588688
commit
21c4613c93
2 changed files with 6 additions and 4 deletions
|
@ -41,10 +41,6 @@ function selectStatsControl(obj) {
|
|||
saveSettingsToFile();
|
||||
}
|
||||
|
||||
var transmissionSpeedChartOptions = {
|
||||
type: "line",
|
||||
};
|
||||
|
||||
ChartJS.register(
|
||||
CategoryScale,
|
||||
LinearScale,
|
||||
|
@ -56,12 +52,15 @@ ChartJS.register(
|
|||
);
|
||||
|
||||
// https://www.chartjs.org/docs/latest/samples/line/segments.html
|
||||
// @ts-expect-error
|
||||
const skipped = (speedCtx, value) =>
|
||||
speedCtx.p0.skip || speedCtx.p1.skip ? value : undefined;
|
||||
// @ts-expect-error
|
||||
const down = (speedCtx, value) =>
|
||||
speedCtx.p0.parsed.y > speedCtx.p1.parsed.y ? value : undefined;
|
||||
|
||||
var transmissionSpeedChartOptions = {
|
||||
type: "line",
|
||||
responsive: true,
|
||||
animations: true,
|
||||
cubicInterpolationMode: "monotone",
|
||||
|
@ -94,9 +93,11 @@ const transmissionSpeedChartData = computed(() => ({
|
|||
borderColor: "rgb(75, 192, 192, 1.0)",
|
||||
pointRadius: 1,
|
||||
segment: {
|
||||
// @ts-expect-error
|
||||
borderColor: (speedCtx) =>
|
||||
skipped(speedCtx, "rgb(0,0,0,0.4)") ||
|
||||
down(speedCtx, "rgb(192,75,75)"),
|
||||
// @ts-expect-error
|
||||
borderDash: (speedCtx) => skipped(speedCtx, [3, 3]),
|
||||
},
|
||||
spanGaps: true,
|
||||
|
|
|
@ -9,6 +9,7 @@ import { useSettingsStore } from "../store/settingsStore.js";
|
|||
const settings = useSettingsStore(pinia);
|
||||
|
||||
function selectRadioControl() {
|
||||
// @ts-expect-error
|
||||
switch (event.target.id) {
|
||||
case "list-rig-control-none-list":
|
||||
settings.radiocontrol = "disabled";
|
||||
|
|
Loading…
Reference in a new issue