bmaupin / langtrends

Programming language trends
https://bmaupin.github.io/langtrends/
MIT License
3 stars 1 forks source link

Show numerical language rank? #31

Closed bmaupin closed 2 years ago

bmaupin commented 2 years ago

Now that we're showing more languages (#30), maybe we should show the numerical language rank somehow? It's easily accessible in Chart.tsx.

One option could be to modify the y axis formatters to include the language name and the rank in parenthesis? e.g.

        formatters: {
          scale: (value: number) => {
            return (
              `${leftYAxisLabels[value - 1]} (${props.firstLanguageIndex + value})` || props.firstLanguageIndex + value
            );
          },
bmaupin commented 2 years ago

Meh, this works but it looks a bit cluttered:

        formatters: {
          scale: (value: number) => {
            return `${leftYAxisLabels[value - 1] || ''} (#${
              props.firstLanguageIndex + value
            })`;
          },

Closing for now