1 Reply Latest reply: Mar 29, 2017 2:23 PM by Vishnu Sreekumar RSS

    Google api call for a bullet chart not working in webview

    Vishnu Sreekumar

      Hi All,


      I have a tricky requirement to include a bullet chart ( something similar to what I have given below) in a pivot table.

      Total length of the bar for each site(dimension value) in the table varies as a factor of the sum of Time Delay Metrics 1&2.


      I will take the row for Site value 3 as an example and explain this. First leg of the barchart (green portion) until the black pointer indicates the value of Time metric 1, which is 23. The green color of the first leg indicates 23 is well within the target. The second yellow leg indicates the value 41 (which is the Time Metric 2) and yellow color indicates that its beyond the expected target but withing the yellow range. Total length of the bar including green and yellow portion represents 23+41 = 64.





      So basically, the bar will be of varying length with two segments of varying color (based on the deviation from targets) and with the needle/boundary also varying. Initially I tried to use linear gauge but found out that varying colors and segment boundaries across different rows are not possible.  Then I was trying to use google api chart by passing the relative values to create the chart as parameters embedded in the URL. Like I would have the following expression


      &[Metric1 Color]&',0,0.0,'&[Metric1 Length]&'|r,'

      &[Metric2 Color]&',0,'&[Metric1 Length]&','&[Metric2 Length]

      &'|r,000000,0,'&[Metric1 Length]&','&[Pointer Length]&'&chco=000000&chbh=12'


      This started giving me 'close enough' embedded chart I wanted !





      But the soon I realized that it shows up only in desktop view and not in webview mode. When I change the view to webview, it just exposed the URL and thats it. If any one has any idea how to get this work in webview/ajax mode, please help !