Initially, in the first html file, I utilized a variable called categoryLinks:
var categoryLinks = {
'Career prospects':'http://localhost/Landa/DirectManagers/511-HelenaChechik/Dim01.html',
'Compensation':'http://localhost/Landa/DirectManagers/511-HelenaChechik/Dim02.html',....
In another html file, I am generating a chart by fetching some Json data:
$(function () {
var chart1;
$.get('graphdata/Dim1.txt?x='+microtime(), function(json){
obj = eval('({'+json+'})');
Within this Json data, there is a reference to the categoryLinks variable to link it with the corresponding hyperlink:
labels: {
formatter: function () {
return '<a href="' + categoryLinks[this.value] + '">' +
this.value + '</a>';
},
style: {color: 'blue',textDecoration: 'underline',fontSize:'13px'}
}
},
Everything is functioning correctly.
I have been attempting to define the links within categoryLinks as relative paths instead of absolute ones, but so far, my attempts have been unsuccessful.
var categoryLinks = {
'Career prospects':'Landa/DirectManagers/511-HelenaChechik/Dim01.html',