Compare commits
2 Commits
3732680d52
...
4d989f10eb
| Author | SHA1 | Date | |
|---|---|---|---|
| 4d989f10eb | |||
| 906e63eb91 |
@@ -5,6 +5,7 @@ import {
|
|||||||
LinearScale,
|
LinearScale,
|
||||||
CategoryScale,
|
CategoryScale,
|
||||||
PointElement,
|
PointElement,
|
||||||
|
LineElement,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
Title,
|
Title,
|
||||||
} from "chart.js";
|
} from "chart.js";
|
||||||
@@ -45,7 +46,14 @@ import { EditableSpan } from "./HistoricalCalendarPrices/EditableSpan.js";
|
|||||||
import { EditableLookbackPeriodStart } from "./HistoricalCalendarPrices/EditableLookbackPeriodStart.js";
|
import { EditableLookbackPeriodStart } from "./HistoricalCalendarPrices/EditableLookbackPeriodStart.js";
|
||||||
import { EditableLookbackPeriodEnd } from "./HistoricalCalendarPrices/EditableLookbackPeriodEnd.js";
|
import { EditableLookbackPeriodEnd } from "./HistoricalCalendarPrices/EditableLookbackPeriodEnd.js";
|
||||||
|
|
||||||
ChartJS.register(LinearScale, CategoryScale, PointElement, Tooltip, Title);
|
ChartJS.register(
|
||||||
|
LinearScale,
|
||||||
|
CategoryScale,
|
||||||
|
PointElement,
|
||||||
|
LineElement,
|
||||||
|
Tooltip,
|
||||||
|
Title
|
||||||
|
);
|
||||||
|
|
||||||
const handleInit = () => {
|
const handleInit = () => {
|
||||||
trpc.CalendarCharacteristicsForm.getAvailableUnderlyings
|
trpc.CalendarCharacteristicsForm.getAvailableUnderlyings
|
||||||
@@ -292,6 +300,8 @@ export function HistoricalCalendarPrices() {
|
|||||||
],
|
],
|
||||||
}}
|
}}
|
||||||
options={{
|
options={{
|
||||||
|
showLine: true,
|
||||||
|
normalized: true,
|
||||||
scales: {
|
scales: {
|
||||||
x: {
|
x: {
|
||||||
title: {
|
title: {
|
||||||
@@ -317,9 +327,12 @@ export function HistoricalCalendarPrices() {
|
|||||||
},
|
},
|
||||||
elements: {
|
elements: {
|
||||||
point: {
|
point: {
|
||||||
radius: 1,
|
radius: 2,
|
||||||
borderWidth: 0,
|
borderWidth: 0,
|
||||||
},
|
},
|
||||||
|
line: {
|
||||||
|
borderWidth: 2,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
plugins: {
|
plugins: {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export const moninessRadius = signal(1);
|
|||||||
|
|
||||||
export const exitDTE = signal(2);
|
export const exitDTE = signal(2);
|
||||||
|
|
||||||
export const stockPriceChartData = signal([]);
|
export const stockPriceChartData = signal<Array<[number, number]>>([]);
|
||||||
|
|
||||||
export const similarCalendarPriceChartData = signal([]);
|
export const similarCalendarPriceChartData = signal([]);
|
||||||
|
|
||||||
|
|||||||
@@ -27,3 +27,4 @@ dist-ssr
|
|||||||
.env
|
.env
|
||||||
*.db
|
*.db
|
||||||
*.db-lck
|
*.db-lck
|
||||||
|
Calendar tRPC
|
||||||
@@ -26,7 +26,8 @@ export const getChartData = publicProcedure
|
|||||||
GROUP BY x
|
GROUP BY x
|
||||||
ORDER BY x ASC
|
ORDER BY x ASC
|
||||||
`,
|
`,
|
||||||
"JSONEachRow"
|
"JSONCompactEachRow"
|
||||||
|
// "JSONEachRow"
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user