AstroDraw / AstroChart

A free and open-source TypeScript library for generating SVG charts to display planets in astrology.
https://astrodraw.github.io
MIT License
223 stars 57 forks source link

Incorrect Formatting #42

Closed aintHuman closed 1 year ago

aintHuman commented 1 year ago

In radix.js, the text formatting is incorrect:

// draw point descriptions
var textsToShow = [(Math.round(this.data.planets[point.name][0]) % 30).toString()];

This absolutely SHOULD NOT use the Math.round function, it should use Math.floor

Consider a planet with a position of say 29.7 degrees, by using the round function it will render it as "0", which visually implies that the planet sits in the in the next sign (round up to 30, then modulo 30 of 30 is 0). Now this cascades to suggest an entirely different meaning from an astrological interpretation point of view, relative to how it should be interpreted at 29 degrees of the correct sign.

I realise that the actual positioning will be correct since that is done using the float value, but this is almost irrelevant given the size of the typical chart. If a glyph is positioned on the cusp between sign A and sign B, and the label says '0deg' then the visual interpretation is that the planet is sitting at 0deg of Sign B, however, if the label says 29deg, then it is unambiguously in the last degree of sign A.

I cannot stress enough, how using the round function, has critical implications when it comes to astrological interpretations.

Can you either change it to floor, or provide a means to provide our own formatting function, which could even have a default using the function as it is currently defined.

Many thanks.

afucher commented 1 year ago

Relase published: https://github.com/AstroDraw/AstroChart/releases/tag/v2.3.2

afucher commented 1 year ago

hey @aintHuman can you share the project/company where you are using this astrochart? I'm always curious to know, where it is been used