2

I want to customise tooltip in google visualization chart so I did

final OrgChart orgChart =  new OrgChart();
                    Options options = Options.create();
                    options.setSize(Size.MEDIUM);
                    options.setAllowHtml(true);
                    options.set("tooltip.isHtml", true);

                    MyDataTable dataTable = MyDataTable.create();
                    dataTable.addColumn(ColumnType.STRING, "InstanceID");
                    dataTable.addColumn(ColumnType.STRING, "ParentID");
                    addTooltipColumn(dataTable);
                     dataTable.setValue(row, 0, "TEST");
                    dataTable.setValue(row, 2, "<div><b>test</b></div>");
                   orgChart.draw(dataTable, options);


private native void addTooltipColumn(MyDataTable data) /*-{
   data.addColumn({'type': 'string', 'role': 'tooltip', 'p': {'html': true}});
}-*/;

But it doesn't show tooltip in html format that have added, How I can format tooltip text and change background color and add image to it? Can somebody help me?

Thanks,

pbhle
  • 2,856
  • 13
  • 33
  • 40
  • Could you please specify your actual question? – radoh Feb 25 '16 at 11:51
  • thanks @radoh for your reply, please have a look – pbhle Feb 25 '16 at 11:54
  • 1
    Did you look at this: http://stackoverflow.com/questions/8675379/add-custom-text-to-google-visualization-tooltip-using-gwt-api – Youssef Lahoud Feb 25 '16 at 13:15
  • I did dataTable.setCell(row, 2, val, "\nExtra information\n On several rows",null); it works means show line break on \n .. but if I put
    or (other Html tags ) its not taking that tags ..
    – pbhle Feb 26 '16 at 05:40

0 Answers0