Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
huxulm committed Sep 8, 2024
1 parent a939fe0 commit 39734e0
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 22 deletions.
1 change: 0 additions & 1 deletion app/build/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ export default function Home() {
</div>
);
}

12 changes: 8 additions & 4 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,26 @@ function Page() {
return (
<div className="flex flex-wrap w-screen h-screen">
<div style={{ width: "50%", height: "50%" }} className="bg-grey-50 p-10">
<div className="w-full h-full ms-5" ref={p1}>
<div className="w-full h-full ms-5 relative" ref={p1}>
<button className="absolute px-2 left-[-0.1rem] top-[-2rem] bg-purple-400 hover:bg-purple-200 rounded border border-purple-950">CSS Framework</button>
<CssTrend width={w1} height={h1} />
</div>
</div>
<div style={{ width: "50%", height: "50%" }} className="bg-grey-50 p-10">
<div className="w-full h-full ms-5" ref={p3}>
<div className="w-full h-full ms-5 relative" ref={p3}>
<button className="absolute px-2 left-[-0.1rem] top-[-2rem] bg-cyan-400 hover:bg-cyan-200 rounded border border-cyan-950">Javascript Framework</button>
<JsTrend width={w3} height={h3} />
</div>
</div>
<div style={{ width: "50%", height: "50%" }} className="bg-grey-50 p-10">
<div className="w-full h-full ms-5" ref={p4}>
<div className="w-full h-full ms-5 relative" ref={p4}>
<button className="absolute px-2 left-[-0.1rem] top-[-2rem] bg-orange-400 hover:bg-orange-200 rounded border border-orange-950">Visualization Framework</button>
<VizTrend width={w4} height={h4} />
</div>
</div>
<div style={{ width: "50%", height: "50%" }} className="bg-grey-50 p-10">
<div className="w-full h-full ms-5" ref={p2}>
<div className="w-full h-full ms-5 relative" ref={p2}>
<button className="absolute px-2 left-[-0.1rem] top-[-2rem] bg-blue-400 hover:bg-blue-200 rounded border border-blue-950">Building & Bundling Tools</button>
<BuildTrend width={w2} height={h2} />
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions components/build/pkg.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[
"esbuild",
"tsup",
"turbo",
"@swc/core",
"bun",
Expand Down
32 changes: 16 additions & 16 deletions components/viz.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,15 @@ export const render: RenderFunction = ({

const yAxisG = g.append("g").call(yAxis);

yAxisG
.append("text")
.attr("class", "axis-label")
.attr("y", -35)
.attr("x", -(height - brushHeight) / 2)
.attr("fill", "black")
.attr("transform", `rotate(-90)`)
.attr("text-anchor", "middle")
.text(yAxisLabel);
// yAxisG
// .append("text")
// .attr("class", "axis-label")
// .attr("y", -35)
// .attr("x", -(height - brushHeight) / 2)
// .attr("fill", "black")
// .attr("transform", `rotate(-90)`)
// .attr("text-anchor", "middle")
// .text(yAxisLabel);

const xAxisG = g
.append("g")
Expand All @@ -153,13 +153,13 @@ export const render: RenderFunction = ({
selectionRef.xAxisG = xAxisG;
selectionRef.yAxisG = yAxisG;

xAxisG
.append("text")
.attr("class", "axis-label")
.attr("y", 35)
.attr("x", chartWidth / 2)
.attr("fill", "black")
.text(xAxisLabel);
// xAxisG
// .append("text")
// .attr("class", "axis-label")
// .attr("y", 35)
// .attr("x", chartWidth / 2)
// .attr("fill", "black")
// .text(xAxisLabel);

const lineGenerator = line<DataShape>()
.x((d) => xScale(xValue(d)))
Expand Down
3 changes: 2 additions & 1 deletion components/viz/pkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[
"d3",
"highcharts",
"recharts",
"echarts",
"@visx/scale",
"highcharts",
"plotly.js"
]

0 comments on commit 39734e0

Please sign in to comment.