MCPcopy Index your code
hub / github.com/ChartGPU/ChartGPU / createUserOptions

Function createUserOptions

examples/million-points/main.ts:237–256  ·  view source on GitHub ↗
(sampling: SeriesSampling, autoBounds: 'visible' | 'global')

Source from the content-addressed store, hash-verified

235 const { data } = createMillionPointsData();
236
237 const createUserOptions = (sampling: SeriesSampling, autoBounds: 'visible' | 'global'): ChartGPUOptions => ({
238 grid: { left: 70, right: 24, top: 24, bottom: 44 },
239 xAxis: { type: 'value', min: 0, max: X_MAX, name: 'Index' },
240 yAxis: { type: 'value', autoBounds, name: 'Value' },
241 tooltip: { show: false },
242 dataZoom: [{ type: 'inside' }, { type: 'slider' }],
243 palette: ['#4a9eff'],
244 animation: false,
245 series: [
246 {
247 type: 'line',
248 name: '1,000,000 points',
249 data,
250 color: '#4a9eff',
251 lineStyle: { width: 1, opacity: 1 },
252 sampling,
253 samplingThreshold: DEFAULT_SAMPLING_THRESHOLD,
254 },
255 ],
256 });
257
258 const applyAutoBounds = (
259 resolved: ResolvedChartGPUOptions,

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected