MCPcopy Create free account
hub / github.com/csskit/csskit / getBaseChartConfig

Function getBaseChartConfig

website/script/benchmarks.js:184–266  ·  view source on GitHub ↗
(title, yAxisTitle, yAxisOptions = {}, thresholds = null)

Source from the content-addressed store, hash-verified

182}
183
184function getBaseChartConfig(title, yAxisTitle, yAxisOptions = {}, thresholds = null) {
185 const fontSizes = {
186 title: "18px",
187 subtitle: "16px",
188 axis: "14px",
189 legend: "14px",
190 tooltip: "14px",
191 };
192
193 const config = {
194 chart: {
195 type: "line",
196 height: 460,
197 zoom: { enabled: true, type: "x" },
198 toolbar: { show: true },
199 ...getChartOptions(),
200 },
201 dataLabels: { enabled: false },
202 stroke: { curve: "straight", width: 2 },
203 title: {
204 text: title,
205 align: "left",
206 style: {
207 fontSize: fontSizes.title,
208 },
209 },
210 grid: {
211 borderColor: getGridBorderColor(),
212 },
213 xaxis: {
214 type: "datetime",
215 title: {
216 text: "Date",
217 style: { fontSize: fontSizes.axis },
218 },
219 labels: {
220 datetimeUTC: false,
221 style: { fontSize: "12px" },
222 },
223 tooltip: { enabled: false },
224 },
225 yaxis: {
226 title: {
227 text: yAxisTitle,
228 style: { fontSize: fontSizes.axis },
229 },
230 labels: {
231 style: { fontSize: fontSizes.axis },
232 },
233 ...yAxisOptions,
234 },
235 legend: {
236 position: "bottom",
237 offsetY: 0,
238 height: 80,
239 fontSize: fontSizes.legend,
240 },
241 tooltip: {

Callers 4

getCriterionChartConfigFunction · 0.85
createTimeChartFunction · 0.85
createCompressionChartFunction · 0.85
createThroughputChartFunction · 0.85

Calls 4

getChartOptionsFunction · 0.85
getGridBorderColorFunction · 0.85
getChartThemeFunction · 0.85
addThresholdAnnotationsFunction · 0.85

Tested by

no test coverage detected