kunjara / jyotish-draw

Drawing component for Jyotish Library
29 stars 28 forks source link

EAST STYLE display has issues #1

Open mahen3d opened 7 years ago

mahen3d commented 7 years ago

Still lot of issues when you resize the chakra for example to 360, EAST style seems to be going completely wrong. If possible try to display east style using below pattern which is more commonly used in South Asian Countries like Sri Lanka.

stye

kunjara commented 7 years ago

This style in Jyotish Draw is called North like in Jagannatha Hora. Almost all designations are from JH.

mahen3d commented 7 years ago

sorry my fault i updated the correct style,

i had to correct following places in to get working for all the inputs (may be its bcasue my system design i only echo output in the view only.) But check following

In namespace Jyotish\Draw\Plot\Chakra;

public function drawChakra(\Jyotish\Base\Data $Data, $x, $y, array $options = null)
    {
        $this->setData($Data);
        //mahen changed
        if(!empty($options))
            $this->setOptions($options);
-----

**
     * Draw rashi labels.
     */
    private function drawRashiLabel()
    {
        $options = $this->getOptions();
        //mahen changed
        if ($options['labelRashiFont']!="") {
            $this->Renderer->setOptions($options['labelRashiFont']);
        }
-------

  /**
     * Draw body labels.
     * 
     * @param int $x
     * @param int $y
     */
    private function drawBodyLabel($x, $y)
    {
        $options = $this->getOptions();
        $bodyLabelPoints = $this->Chakra->getBodyLabelPoints($x, $y, $options);

        foreach ($bodyLabelPoints as $body => $point) {
            //mahen changed
            if (!array_key_exists($body, Graha::$graha) && !empty($options['labelExtraFont'])) {
                $this->Renderer->setOptions($options['labelExtraFont']);
            } elseif ($options['labelGrahaFont']!="") { //mahen changed
                $this->Renderer->setOptions($options['labelGrahaFont']);
            }
kunjara commented 7 years ago

Are you using version 1.1.0? Such mistakes should not be in this version.

nagarajan010 commented 6 years ago

@mahen3d @kunjara can you please show how to use this library to draw charts, i have already found how to use the other library to get the calculations just need to know how to use this one to make the chart image

would be really helpful if some one can show an example

Thank you

shikhardb commented 6 years ago

@nagarajan010 Did you find the solution yet?

nagarajan010 commented 6 years ago

@shikhardb nope, i had to make my own code for drawing the chart but its not fully done yet

shikhardb commented 6 years ago

@nagarajan010 Is the chart drawing function done? I'm having issues creating my own charts?

vaishalithaker commented 5 years ago

Can anyone provide chart rendering inputs code to render teh chart