42 karma · joined Dec 27, 2023 (2y ago) · 28 submissions
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
I can't speak for Google's official implementation though.
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
At that point you could just use an SVG charting library. Good charting libraries will have code snippets readily available for line charts that you can copy/paste. SVG can be styled with CSS just like text.
"Simpler code" seems like the main benefit but it comes with a big "weirdness" factor as the tradeoff. I'd bet there's a super lightweight SVG charting lib somewhere out there which is about as simple as this while being much more standard. i.e. supports line charts only, and has the simple type signature `(number[]) => SVGElement`.
comment 2y ago · link · parent
By the way the answer to the question "why are we templating yaml?" is: people are just more familiar with it and don't want to have to translate examples to jsonnet that they copy and paste from the web. Do not underestimate this downside :) Same downside would probably apply to TypeScript-generated configs I bet.
comment 2y ago · link · parent
More info here: https://go.dev/blog/constants