AstroDraw / AstroChart

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

Is possible change the aspects color line in chart ? #65

Closed marceloandriolli closed 11 months ago

marceloandriolli commented 11 months ago

First of all, thank you @Kibo for this awesome library.

Describe the bug I'm try to change the color from aspects in chart by settings when I call Chart but instead drawing the line with the colors that I defined in settings, it drawing the lines in default colors.

To Reproduce Steps to reproduce the behavior:

            var settings = {
                DEBUG: false,
                DIGNITIES_RULERSHIP: "", // r
                DIGNITIES_DETRIMENT: "", // d
                DIGNITIES_EXALTATION: "", // e
                DIGNITIES_EXACT_EXALTATION: "", // E
                DIGNITIES_FALL: "", //
                SYMBOL_SCALE: 1.2,
                PADDING: 30,
                CIRCLE_STRONG: 1,
                LINE_COLOR: "#999",
                COLOR_BACKGROUND: '#FFFFFF',
                ASPECTS: {
                    "conjunction": {
                        "degree": 0,
                        "orbit": 10,
                        "color": "transparent"
                    },
                    "square": {
                        "degree": 90,
                        "orbit": 8,
                        "color": "#BD4B4B"
                    },
                    "trine": {
                        "degree": 120,
                        "orbit": 8,
                        "color": "#504AC6"
                    },
                    "opposition": {
                        "degree": 180,
                        "orbit": 10,
                        "color": "#BF67B1"
                    },
                    "sextile": {
                        "degree": 60,
                        "orbit": 6,
                        "color": "#85AF6B"
                    },
                },
                COLORS_SIGNS: [
                    COLOR_ARIES,
                    COLOR_TAURUS,
                    COLOR_GEMINI,
                    COLOR_CANCER,
                    COLOR_LEO,
                    COLOR_VIRGO,
                    COLOR_LIBRA,
                    COLOR_SCORPIO,
                    COLOR_SAGITTARIUS,
                    COLOR_CAPRICORN,
                    COLOR_AQUARIUS,
                    COLOR_PISCES,
                ],
            };
            $(".astral-map-content").html(response.html);
            var chart = new astrology.Chart("paper", 700, 700, settings)
                .radix(response.chart)
                .aspects(response.aspects_chart);

Screenshots image

Expected behavior I would like that the aspects color line in chart it was what was presented in my own settings when I call Chart.

Thank you!