hyper link in the data table.

49 views
Skip to first unread message

Brian Flieck

unread,
Apr 24, 2018, 1:40:15 PM4/24/18
to Google Visualization API
does anyone know if you can add hyperlinks in the data-table. my data is referencing folder names and i'd like to make the folder names hyperlinks to the actual folder location.

 ['folder', 'ready', 'not sent off shore', 'not ready', 'freelanced', 'ready to QA' , 'placeholder' ],
['Christopher_Banks/post/CB_instock/0' , 0,  1, 0, 0, 0, 0],
['Christopher_Banks/post/CB_instock/6' , 0,  1, 0, 0, 0, 0],
['Christopher_Banks/post/CB_instock/9' , 0,  1, 0, 0, 0, 0],
['Aeropostale/post/instock/0' , 0,  0, 0, 43, 0, 0],
['Aeropostale/post/instock/8' , 0,  0, 0, 103, 0, 0],
['Tumi/post/instock/' , 14,  115, 0, 0, 0, 0],
['Maurices/Post/instock/RUSH' , 72,  0, 1, 0, 0, 0],
['Maurices/Post/instock/0' , 2,  0, 0, 0, 0, 0],
['Maurices/Post/instock/3' , 10,  0, 0, 0, 0, 0],
['Maurices/Post/instock/5' , 17,  0, 0, 0, 0, 0],
['Maurices/Post/instock/6' , 17,  0, 0, 0, 0, 0],
['Maurices/Post/instock/7' , 23,  0, 0, 0, 0, 0],
['Maurices/Post/instock/8' , 10,  0, 0, 0, 0, 0],
['Maurices/Post/instock/LIGHTBOXCALLOUTS' , 0,  4, 0, 0, 0, 0],
['Dress_Barn/Post/instock/RUSH' , 22,  0, 0, 0, 0, 0],
['Dress_Barn/Post/instock/0' , 24,  0, 0, 0, 0, 0],
['Dress_Barn/Post/instock/1' , 46,  0, 0, 0, 0, 0],
['Dress_Barn/Post/instock/2' , 86,  0, 0, 0, 0, 0],
['Dress_Barn/Post/instock/3' , 23,  0, 0, 0, 0, 0],
['Dress_Barn/Post/instock/5' , 14,  0, 1, 0, 0, 0],
['Dress_Barn/Post/instock/6' , 20,  0, 0, 0, 0, 0],
['Dress_Barn/Post/instock/7' , 8,  0, 0, 0, 0, 0],
['NYCompany/post/instock/RUSH' , 1,  0, 0, 5, 0, 0],
['NYCompany/post/instock/0' , 1,  0, 0, 0, 0, 0],
['NYCompany/post/instock/2' , 39,  0, 0, 0, 0, 0],
['NYCompany/post/instock/3' , 37,  0, 0, 35, 0, 0],
['NYCompany/post/instock/4' , 81,  0, 1, 0, 0, 0],
['NYCompany/post/instock/5' , 8,  2, 96, 0, 0, 0],
['LTBrands/post/Instock/8' , 31,  0, 0, 0, 0, 0],
['HenriBendel/post/instock/4' , 8,  0, 0, 0, 0, 0],
['LuckyBrand/Post/Instock/2' , 97,  0, 0, 0, 0, 0],
['LuckyBrand/Post/Instock/4' , 115,  0, 3, 0, 0, 0],
['LuckyBrand/Post/Instock/6' , 0,  0, 2, 0, 0, 0],
['LuckyBrand/Post/Instock/7' , 3,  0, 0, 0, 0, 0],
['LuLuLemon/Post/instock/PRIORITY' , 0,  0, 0, 135, 0, 0],
['LuLuLemon/Post/instock/1' , 0,  0, 0, 238, 0, 0],
['LuLuLemon/Post/instock/3' , 0,  0, 0, 82, 0, 0],
['LuLuLemon/Post/instock/4' , 0,  0, 0, 56, 0, 0],
['LuLuLemon/Post/instock/5' , 217,  0, 0, 0, 0, 0],
['Uniqlo/Post/instock/6' , 3,  0, 0, 0, 0, 0],
['Uniqlo/Post/instock/7' , 199,  0, 46, 0, 0, 0],
['Uniqlo/Post/instock/8' , 5,  0, 204, 0, 0, 0],
['CliqueMedia/instock/2' , 12,  0, 0, 0, 0, 0],
]);


Ray Thomas

unread,
Apr 25, 2018, 7:31:05 PM4/25/18
to Google Visualization API
Yes you can. Once I've got the table I use .getNumberOfRows() to get the number of rows, then loop through the table getting the values I need from it using .getValue and use .setCell to change the formatted value.






As the links are completely different to the cell values I put the URLs in the spreadsheet, but there's no reason the links cannot be constructed in the script from the information already in the cell.

Ray

Ray Thomas

unread,
Apr 26, 2018, 4:37:33 PM4/26/18
to Google Visualization API
Hello Brian,

I think I may have misled you. I had a look through your earlier posts and tried to recreate what you are trying to do.

Adding links to the data only appears to work if the the chart type is a table. I also had a look at the huge gap between the control and the chart. I have no idea what is happening. It's nothing to do with the padding or margin on either div. I tried changing both to negative values and all it does is move the chart div up to cover the control div.


Ray

Brian Flieck

unread,
Apr 26, 2018, 5:21:21 PM4/26/18
to Google Visualization API
Thanks Ray! yea i was playing with your info eariler and thought i could set a cell to be a URL, and it doesn't seem to work. I haven't tried in table form yet, but i'm guessing your correct that i won't work. I have to update my other post, i found the answer to the spacing issue.

it seems that the chart wrapper had to come at the bottom of the var.

        var barChart = new google.visualization.ChartWrapper({
          'chartType': 'BarChart',
          'containerId': 'chart_div',
          'options': {
//                      width: 1200,
                  'height': 900,
                  'colors': ['#00a591', '#ECDB54', '808080', '#6B5B95', '3645b5', '000000'],
                  'isStacked': true,
                  'fontSize': 11,
                  'chartArea': {'left': 450, 'top': 20, 'right': 250, 'bottom': 50},
                  'fontSize': 11,
                  'title': 'Folder Count 04-26-18 05:10:01'
          }
        });

Auto Generated Inline Image 1
Reply all
Reply to author
Forward
0 new messages