tscircuit/autorouting-dataset-01

This code manages the hardware and electronic components for circuit design and PCB layout, defining components like resistors, capacitors, transistors, connectors, and footprints, and providing tools for component placement, PCB topology, and electrical connections.

Version
1.0.102
License
unset
Stars
4

scripts/run-benchmark/generateHtmlVisualization/generateChartScripts.ts

import { generateChartConfig } from "scripts/run-benchmark/generateHtmlVisualization/generateChartConfig"
import { generateSuccessRateChart } from "scripts/run-benchmark/generateHtmlVisualization/generateSuccessRateChart"
import { generateTimeChart } from "scripts/run-benchmark/generateHtmlVisualization/generateTimeChart"
import type { BenchmarkRow } from "types/run-benchmark/BenchmarkRow"

/**
 * Generates the chart initialization scripts with embedded benchmark data.
 */
export const generateChartScripts = (result_row_list: BenchmarkRow[]) => {
  return `<script>
    const benchmark_data = ${JSON.stringify(result_row_list)};
    ${generateChartConfig()}
    ${generateSuccessRateChart()}
    ${generateTimeChart()}
</script>`
}