ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  mouseover on stackedbar in yAxis2
Posted by at on Dec-14-2012 16:43
Hi Peter, got a problem on mouseover for the stackedbar with lines chart. It's only
showing when I hover over the top bar but not on the bar below. Im adding the line
layer first which is on y-axis then the bar layer on y-axis2. Code snippets below. I'm
wondering on this since I was able to make a stackedbar chart with almost same code
but is on y-axis (and no line layer) without problem. Any idea on this? Thanks.


$this->mapAttribArr['bar'] =  "header=[{xLabel}]
                                          body=[Quantity = {value}]";

function addLineLayer(&$c) {
        $this->index = 0;
        $line_width = $this->lineWidth;
        $this->lineLayer = $c->addLineLayer2();
        foreach($this->lineDataArray as $dataArray) {
            $dataSetObj = $this->lineLayer->addDataSet($dataArray, $this-
>transparentColors[$this->index], $this->legendArray[$this->index]);
            $dataSetObj->setDataSymbol($this->dataSymbol[$this->index], $this-
>dataSymbolSize);
            $dataSetObj->setLineWidth($line_width + $this->index);
            $this->index++;
        }
        if (isset($this->mapAttribArr['line']) && $this->mapAttribArr['line'])
            $this->lineLayer->setHTMLImageMap('{none}','', "title='" . $this-
>mapAttribArr['line'] . "");
}

function addBarLayer(&$c) {
        $this->barLayer = $c->addBarLayer2(Stack, $this->barDepth);
        foreach($this->barDataArray as $data) {
            $this->barLayer->addDataSet($data, $this->transparentColors[$this->index],
$this->legendArray[$this->index]);
            $this->barLayer->setBorderColor(Transparent);
            if (isset($this->mapAttribArr['bar']) && $this->mapAttribArr['bar'])
                $this->barLayer->setHTMLImageMap('{none}', '{default}', "title='" . $this-
>mapAttribArr['bar'] . "");
            $this->index++;
        }
        $this->barLayer->setUseYAxis2();
}

  Re: mouseover on stackedbar in yAxis2
Posted by Peter Kwan on Dec-15-2012 04:05
Hi at,

From my understanding of your code, it seems the title attribute is not well-formed. The title attribute starts with a single quote, but does not have a single quote at the end.

In your code, is it possible the "" should be "'" instead?

If the above still cannot solve the problem, is it possible to save the HTML output, so I can check the image map and check if it matches with the image? You may use "Save As" and then save the HTML output as a web archive, and include it in your message or email it to me at pkwan@advsofteng.net. If you cannot send the entire web page to me, please cut and paste the image map part out (right click, select "View Source" and cut and paste from <map to </map>), and email me just the image map part of the HTML and the chart images for analysis.

Regards
Peter Kwan

  Re: mouseover on stackedbar in yAxis2
Posted by at on Dec-18-2012 09:39
Hi Peter, thanks, you're right, it lacks the single quote between the double quotes. Just
copied it from my other working code so that's why I'm confused why it's not working. The
single quote must not have been highlighted when I copied it. Thanks again for the great
help.