chore: code formatting

This commit is contained in:
github-actions[bot]
2023-03-16 01:21:21 +00:00
parent b4908d81a3
commit ff1008392f
4 changed files with 50 additions and 50 deletions

View File

@@ -883,7 +883,7 @@ export const Graph = {
d3.line() d3.line()
.curve(d3.curveLinear) .curve(d3.curveLinear)
.x(d => x(d[0])) .x(d => x(d[0]))
.y(d => y(d[1])) .y(d => y(d[1])),
) )
.attr("fill", "transparent") .attr("fill", "transparent")
.attr("stroke", "#87ceeb") .attr("stroke", "#87ceeb")
@@ -996,5 +996,5 @@ export const Graph = {
.text(d => d) .text(d => d)
return d3n.svgString() return d3n.svgString()
} },
} }

View File

@@ -67,11 +67,11 @@ export default async function({login, graphql, data, imports, q, queries, accoun
let charts = _charts ? true : null let charts = _charts ? true : null
if ((["graph", "chartist"].includes(_charts_type)) && (imports.metadata.plugins.stargazers.extras("charts.type", {extras}))) { if ((["graph", "chartist"].includes(_charts_type)) && (imports.metadata.plugins.stargazers.extras("charts.type", {extras}))) {
console.debug(`metrics/compute/${login}/plugins > stargazers > generating charts`) console.debug(`metrics/compute/${login}/plugins > stargazers > generating charts`)
charts = await Promise.all([{data: total, low: total.min, high: total.max}, {data: increments, low: 0, high: increments.max, sign: true}].map(({data: {dates: set}, low, high, sign = false}) => charts = await Promise.all(
imports.Graph.timeline(Object.entries(set).map(([x, y]) => ({x:new Date(x), y, text:imports.format(y, {sign})})), {low, high, [{data: total, low: total.min, high: total.max}, {data: increments, low: 0, high: increments.max, sign: true}].map(({data: {dates: set}, low, high, sign = false}) =>
match:(data, ticks) => data.filter(([x]) => ticks.map(t => t.toISOString().slice(0, 10)).includes(x.toISOString().slice(0, 10))), imports.Graph.timeline(Object.entries(set).map(([x, y]) => ({x: new Date(x), y, text: imports.format(y, {sign})})), {low, high, match: (data, ticks) => data.filter(([x]) => ticks.map(t => t.toISOString().slice(0, 10)).includes(x.toISOString().slice(0, 10)))})
}) ),
)) )
} }
//Generating worldmap //Generating worldmap