MCPcopy Create free account
hub / github.com/botbotrobotics/BotBrain / getChartColor

Function getChartColor

frontend/src/components/chart-card.tsx:165–188  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

163
164 // Generate chart colors based on the chart type
165 const getChartColor = () => {
166 switch (chartType) {
167 case 'line':
168 return '#7C3AED'; // Violet
169 case 'bar':
170 return '#3B82F6'; // Blue
171 case 'area':
172 return '#10B981'; // Green
173 case 'scatter':
174 return '#F59E0B'; // Amber
175 case 'radar':
176 return '#EC4899'; // Pink
177 case 'gauge':
178 case 'radialBar':
179 return '#8B5CF6'; // Purple
180 case 'pie':
181 case 'donut':
182 return ['#7C3AED', '#3B82F6', '#10B981', '#F59E0B', '#EC4899'];
183 case 'heatmap':
184 return ['#10B981', '#F59E0B', '#EC4899', '#EF4444'];
185 default:
186 return '#7C3AED';
187 }
188 };
189
190 // Format data for different chart types
191 const formatDataForApex = (): ApexChartData => {

Callers 2

formatDataForApexFunction · 0.85
renderChartFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected