kingcaigen / birdeye

Automatically exported from code.google.com/p/birdeye
0 stars 1 forks source link

MicroBarChart tooltip y location slightly off. #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use showDataTips with a MicroBarChart with a large enough width to
   see where the tooltip location appears.

<microcharts:MicroBarChart width="200" spacing="3" showDataTips="true"
   height="40" dataProvider="[200, 80, 30, 10]"/>

2. The attached MicroBarChart_tooltip_prefix.gif image shows that the 
tooltip appears in the lower corner, instead of centered vertically like 
the other microcharts.

What is the expected output? What do you see instead?
Expecting to see a vertically centered tooltip location.

In the createBars() code, the startY value is incremented after it is used 
for positioning the column, but before the tooltip location is specified.

  startY += columnWidth + spacing;

A fix is either to move the startY change to below the 
  if (showDataTips)

block, or to change the positioning of the createToolTip to subtract the 
spacing value:

  geomGroup.createToolTip(data.getItemAt(i), _dataField, space+startX + 
posX, space - spacing + startY - columnWidth/2, 3);

The attached MicoBarChart_tooltip_postFix.gif file shows the vertically 
centered tooltip after the fix is applied.

What version of the product are you using? On what operating system?
trunk, March 28th, Windows.

Original issue reported on code.google.com by boni...@frii.com on 28 Mar 2009 at 11:09

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by f4us...@gmail.com on 30 Mar 2009 at 10:41