Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New watermark on SVG graphs. #2776

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 23 additions & 24 deletions web/components/charts/helpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,29 @@ export const SVGChart = <X, TT extends { x: number; y: number }>(props: {
</clipPath>
</defs>

{!noWatermark && (
<svg x={10} y={h - 35} opacity={0.15}>
<g transform='scale(1.5)'>
<path
d="M5.24854 17.0952L18.7175 6.80301L14.3444 20M5.24854 17.0952L9.79649 18.5476M5.24854 17.0952L4.27398 6.52755M14.3444 20L9.79649 18.5476M14.3444 20L22 12.638L16.3935 13.8147M9.79649 18.5476L12.3953 15.0668M4.27398 6.52755L10.0714 13.389M4.27398 6.52755L2 9.0818L4.47389 8.85643M12.9451 11.1603L10.971 5L8.65369 11.6611"
strokeLinecap="round"
strokeLinejoin="round"
fill='none'
className="stroke-gray-900 dark:stroke-white"
></path>
</g>
<text
x={40}
y={25}
fontSize="18"
fill="currentColor"
className='font-bold dark:font-semibold'
>
manifold.markets
</text>
</svg>
)}

<g>
{!hideXAxis && <XAxis axis={xAxis} w={w} h={h} />}

Expand Down Expand Up @@ -550,30 +573,6 @@ export const SVGChart = <X, TT extends { x: number; y: number }>(props: {
))}
</g>
</g>
{!noWatermark && (
<>
<rect
x={4}
y={h - 23}
width={150}
height={18}
className="fill-canvas-0"
rx={4}
ry={4}
opacity={0.85}
/>
<text
x={10}
y={h - 10}
fontSize="12"
fill="currentColor"
opacity={0.5}
fontWeight={'semibold'}
>
Source: manifold.markets
</text>
</>
)}
</svg>
</div>
)
Expand Down
Loading