Automate issuer overlay creation from ticker searches
This commit is contained in:
@@ -31,7 +31,7 @@ export function getPriceChangeColor(change: number): string {
|
||||
* Convert CSS variable to computed color value
|
||||
* Used for chart export since html-to-image can't render CSS variables
|
||||
*/
|
||||
export function cssVarToColor(cssVar: string): string {
|
||||
function cssVarToColor(cssVar: string): string {
|
||||
if (typeof window === 'undefined') return cssVar;
|
||||
|
||||
// If it's already a color value, return as-is
|
||||
|
||||
@@ -59,7 +59,7 @@ export function isPriceData(data: ChartDataPoint): data is { date: string; price
|
||||
* Normalize data to ensure consistent structure
|
||||
* Converts price data to OHLCV-like structure for candlestick charts
|
||||
*/
|
||||
export function normalizeChartData<T extends ChartDataPoint>(data: T[]): T[] {
|
||||
function normalizeChartData<T extends ChartDataPoint>(data: T[]): T[] {
|
||||
if (!data || data.length === 0) return [];
|
||||
|
||||
// Sort by date ascending
|
||||
@@ -72,7 +72,7 @@ export function normalizeChartData<T extends ChartDataPoint>(data: T[]): T[] {
|
||||
* Sample data for performance with large datasets
|
||||
* Keeps every Nth point when dataset is too large
|
||||
*/
|
||||
export function sampleData<T extends ChartDataPoint>(
|
||||
function sampleData<T extends ChartDataPoint>(
|
||||
data: T[],
|
||||
maxPoints: number = 1000
|
||||
): T[] {
|
||||
@@ -96,7 +96,7 @@ export function sampleData<T extends ChartDataPoint>(
|
||||
/**
|
||||
* Calculate min/max values for Y-axis domain
|
||||
*/
|
||||
export function calculateYAxisDomain<T extends ChartDataPoint>(
|
||||
function calculateYAxisDomain<T extends ChartDataPoint>(
|
||||
data: T[],
|
||||
padding: number = 0.1
|
||||
): [number, number] {
|
||||
@@ -126,7 +126,7 @@ export function calculateYAxisDomain<T extends ChartDataPoint>(
|
||||
/**
|
||||
* Calculate volume max for volume indicator Y-axis
|
||||
*/
|
||||
export function calculateVolumeMax<T extends ChartDataPoint>(data: T[]): number {
|
||||
function calculateVolumeMax<T extends ChartDataPoint>(data: T[]): number {
|
||||
if (data.length === 0 || !isOHLCVData(data[0])) return 0;
|
||||
|
||||
return Math.max(...data.map(d => (isOHLCVData(d) ? d.volume : 0)));
|
||||
|
||||
@@ -10,7 +10,7 @@ type IndexCardProps = {
|
||||
positive?: boolean;
|
||||
};
|
||||
|
||||
export type { IndexCardProps };
|
||||
;
|
||||
|
||||
type IndexCardRowProps = {
|
||||
cards: IndexCardProps[];
|
||||
|
||||
@@ -27,7 +27,7 @@ export type FinancialControlSection = {
|
||||
onChange: (value: string) => void;
|
||||
};
|
||||
|
||||
export type FinancialsToolbarProps = {
|
||||
type FinancialsToolbarProps = {
|
||||
sections: FinancialControlSection[];
|
||||
searchValue: string;
|
||||
onSearchChange: (value: string) => void;
|
||||
|
||||
@@ -58,7 +58,7 @@ function surfaceBadges(node: Extract<StatementTreeNode, { kind: "surface" }>) {
|
||||
badges.push({ label: "Low confidence", tone: "warning" });
|
||||
}
|
||||
|
||||
const detailCount = node.row.detailCount ?? node.directDetailCount;
|
||||
const detailCount = node.directDetailCount;
|
||||
if (detailCount > 0) {
|
||||
badges.push({ label: `${detailCount} details`, tone: "default" });
|
||||
}
|
||||
|
||||
@@ -16,7 +16,11 @@ type StatementRowInspectorProps = {
|
||||
periods: FinancialStatementPeriod[];
|
||||
surfaceKind: Extract<
|
||||
FinancialSurfaceKind,
|
||||
"income_statement" | "balance_sheet" | "cash_flow_statement"
|
||||
| "income_statement"
|
||||
| "balance_sheet"
|
||||
| "cash_flow_statement"
|
||||
| "equity_statement"
|
||||
| "disclosures"
|
||||
>;
|
||||
renderValue: (
|
||||
row: SurfaceFinancialRow | DetailFinancialRow,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
export {
|
||||
buildStageTimeline,
|
||||
fallbackStageProgress,
|
||||
|
||||
stageLabel,
|
||||
taskStageOrder,
|
||||
|
||||
taskTypeLabel,
|
||||
type StageTimelineItem
|
||||
|
||||
} from '@/lib/task-workflow';
|
||||
|
||||
Reference in New Issue
Block a user