r googleVis: How to control html tooltips (positioning, border and background) - r

I have figured out how to create custom html tooltips by using roles via googleVis. I can easily modify the content using html but I cannot understand how I can control the tooltip box itself.
My problem was generated because some of the custom tooltips I created are falling outside my chart area and I tried (unsuccessfully) to find a way to control the tooltip position. Idealy I would like to make them behave in the exact same way default tooltips behave in googleVis (always stay withinin the chart area).
When I later implemented the same concept into a line chart I found that I have another problem as well. The tooltip is falling on the line so I cannot see what is the exact point that refers to the tooltip.
Would it be possible for example to keep the callout style of default googleVis tooltip and change the content with HTML?
Additionally, do you know if there is any way to control more tooltip properties like border and background color?

i was also looking for the same
1) when laying out your data, make sure it has columns alternating between, say, data and tooltips, data and tooltips,... that way it is possible to customize tooltips for multiple columns (it does not work if you just append - à la cbind - a set of tooltips columns to your data frame).
Additionally try this http://rcharts.io/viewer/?6644957#.VHcpEkvrdbg

Related

D3, Change the style of collapsible tree attribute

Im trying to do an OrgChart using d3 , i decided to use this tree Collapsible tree, so i want to remove the circles and apply my own style on the tree like adding borders to each title, change background color and so on...
Is there is any way i can do it ? if not do you suggest any other approach to create interactive organizational chart?
You cannot add borders and backgrounds to text, at least directly.
You can add some rectangles behind the text elements and style them as you want.
The issue with this approach is that you need to compute the text size for each element, so you size the rectangles properly.
You can make it a try and post your specific questions here.

Clickable Map Grid Overlay

I am trying to create a map grid using Google maps. I have a fixed border frame and need to create an overlay on top, similar to this and this example. However, I also need to be able to hover over map tiles using the mouse cursor and change the hue/saturation of the overlay elements accordingly. Each element in the grid will have an onClick() event associated with it.
After some research I found libraries that can be used to draw a grid such as OSMatrix.I also noticed that one of the d3.js examples is somewhat similar to what I am aiming to achieve. The question is, how can I add the visualization as an overlay on top of a map and is it possible to accomplish with API v3 and JavaScript?

Unable to style a cell tooltip of ngGrid

I am trying to add a tooltip to my cells. Using the title attribute works, but the style is different from the rest of the page (bootstrap styling) http://i.stack.imgur.com/PQMmj.png
Changing the title attribute to tooltip doesn't work - it looks like it hides the tooltip under the next cell (changing the coordination of the tooltip to something within the range of the cell, made it partially visible).
(I am new so I cant post images, https://github.com/angular-ui/ng-grid/issues/800 )
Any idea whats wrong?
Thank you.

Dojo GFX widgets displaying float-like behaviour instead of correct positioning

I'm using Dojo GFX to do some simple drawing, but having a problem with IE 7/8 (switching browsers is not an option).
If I create a div, set up a surface and draw some rects, they draw correctly relative to the div, so far so good.
However, what I want to do is create a widget, something with an embedded 'surface' that draws based on some widget-specific data. As such, I have a widget that contains a div, and I draw into this div. When I do that, the rects I create behave as if they are responding to a float:right, appearing in order they are created and ignoring the 'x' parameter.
I assume that this behaviour is something to do with CSS, but I haven't got to the bottom of it yet. Any ideas or solutions gratefully appreciated!
Updates:
I've disabled all stylesheets and I am not using style attributes. No difference to the behaviour.
I've inspected the markup that gets generated using IE8 dev tools. Apart from the different location of the containing div, the only difference I can see is that the v:roundrect elements have no child elements when created against the widget div, but they do have empty elements like stroke when created against the div referenced by ID.
Reading back through the docs, a difference I can see that might be responsible is that the postCreate method where I am doing my drawing is manipulating a div that has not been added to the dom yet, whereas drawing on a hardcoded div is done when it does exist. Maybe the difference in rendering is something to do with this? Is there a specific lifecycle function which is appropriate to draw in for widgets?
It seems that if you are going to use Dojo GFX and draw on DOM elements that are created as part of a widget in IE7/8, you must actually do the drawing in an override of the startup() method.
Drawing in the postCreate() method causes incorrect rendering resembling a float: left.

Flex BarChart long text

In my application, I am using a BarChart to display data. However, the text in the category axis can be too long to display on the chart, so flex adjusts the font size automatically to the point that the data is either unreadable, or the text is partially visible.
The length of the text varies every time new data comes in, so I can't set the gutterLeft attribute to a static value at runtime.
Two things that come to my mind are:
Change the gutter dynamically according to new data
Have a scroll bar on the categoryaxis so that if any text won't fit in the space, the user can scroll to see it
Any help would be appreciated.
EDIT:
I have hundreds of rows of data being graphed at once, so I can't really use a legend for each item.
Also, I have no idea how to change the gutterLeft property with actionscript. Doing it in MXML is as simple as
gutterLeft="100"
but I cannot access the property using actionscript. I also tried to bind the gutterLeft variable to an integer and change that integer and it still didn't work. :|
the problem is that gutterleft is a style, and therefor needs to be set as one when using actionscript.
I was hoping to see your code to give a more detailed answer but what you want to do is:
mychart.setStyle("gutterLeft",500);

Resources