Using external data on the Tooltip Highcharts












0















I have a Highchart that displays the average of a Satisfaction Survey result from the employees.



For example, the employee A received three ratings on January (2, 5, 8), the average rating is 5, so I display 5 on that month. I get an array with the averages of the months and put it on the chart. "Average of January, February ...".



Now I need to show not the average, but the amount of avaliations that the employee received on the given month on the Tooltip.



I already have the array prepared with the quantity of each month, but I am not able to display it where I want.



I am trying to show this data on the Tooltip, it comes on an array, but it shows the entire array instead of showing just one per serie.



How can I do that? I have no idea.



Highcharts.chart(pessoa, {
chart: {
type: 'column'
},
title: {
text: pessoa
},
subtitle: {
text: 'Média por mês'
},
xAxis: {
categories: meses,
crosshair: true
},
yAxis: {
min: 0,
title: {
text: 'Média'
}
},
tooltip: {
headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
pointFormat: '<tr><td style="color:{series.color};padding:0">
{series.name}: </td>' +
'<td style="padding:0"><b>{point.y:.2f}</b></td><br> Total:' + R(resposta) + '</tr>',
footerFormat: '</table>',
shared: true,
useHTML: true
},
plotOptions: {
column: {
pointPadding: 0.2,
borderWidth: 0,
stacking: 'normal',
dataLabels: {
enabled: true,
color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'black'
}

}
},
series: [{
name: 'Média',
data: nota1

}]
});


The variable nota1 is the series (the averages).



The chart at the moment










share|improve this question


















  • 1





    Could you prepare a simplified online example of the chart with sample data? Have you tired tooltip.formatter? See api.highcharts.com/highcharts/tooltip.formatter

    – Wojciech Chmiel
    Nov 15 '18 at 7:30
















0















I have a Highchart that displays the average of a Satisfaction Survey result from the employees.



For example, the employee A received three ratings on January (2, 5, 8), the average rating is 5, so I display 5 on that month. I get an array with the averages of the months and put it on the chart. "Average of January, February ...".



Now I need to show not the average, but the amount of avaliations that the employee received on the given month on the Tooltip.



I already have the array prepared with the quantity of each month, but I am not able to display it where I want.



I am trying to show this data on the Tooltip, it comes on an array, but it shows the entire array instead of showing just one per serie.



How can I do that? I have no idea.



Highcharts.chart(pessoa, {
chart: {
type: 'column'
},
title: {
text: pessoa
},
subtitle: {
text: 'Média por mês'
},
xAxis: {
categories: meses,
crosshair: true
},
yAxis: {
min: 0,
title: {
text: 'Média'
}
},
tooltip: {
headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
pointFormat: '<tr><td style="color:{series.color};padding:0">
{series.name}: </td>' +
'<td style="padding:0"><b>{point.y:.2f}</b></td><br> Total:' + R(resposta) + '</tr>',
footerFormat: '</table>',
shared: true,
useHTML: true
},
plotOptions: {
column: {
pointPadding: 0.2,
borderWidth: 0,
stacking: 'normal',
dataLabels: {
enabled: true,
color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'black'
}

}
},
series: [{
name: 'Média',
data: nota1

}]
});


The variable nota1 is the series (the averages).



The chart at the moment










share|improve this question


















  • 1





    Could you prepare a simplified online example of the chart with sample data? Have you tired tooltip.formatter? See api.highcharts.com/highcharts/tooltip.formatter

    – Wojciech Chmiel
    Nov 15 '18 at 7:30














0












0








0








I have a Highchart that displays the average of a Satisfaction Survey result from the employees.



For example, the employee A received three ratings on January (2, 5, 8), the average rating is 5, so I display 5 on that month. I get an array with the averages of the months and put it on the chart. "Average of January, February ...".



Now I need to show not the average, but the amount of avaliations that the employee received on the given month on the Tooltip.



I already have the array prepared with the quantity of each month, but I am not able to display it where I want.



I am trying to show this data on the Tooltip, it comes on an array, but it shows the entire array instead of showing just one per serie.



How can I do that? I have no idea.



Highcharts.chart(pessoa, {
chart: {
type: 'column'
},
title: {
text: pessoa
},
subtitle: {
text: 'Média por mês'
},
xAxis: {
categories: meses,
crosshair: true
},
yAxis: {
min: 0,
title: {
text: 'Média'
}
},
tooltip: {
headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
pointFormat: '<tr><td style="color:{series.color};padding:0">
{series.name}: </td>' +
'<td style="padding:0"><b>{point.y:.2f}</b></td><br> Total:' + R(resposta) + '</tr>',
footerFormat: '</table>',
shared: true,
useHTML: true
},
plotOptions: {
column: {
pointPadding: 0.2,
borderWidth: 0,
stacking: 'normal',
dataLabels: {
enabled: true,
color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'black'
}

}
},
series: [{
name: 'Média',
data: nota1

}]
});


The variable nota1 is the series (the averages).



The chart at the moment










share|improve this question














I have a Highchart that displays the average of a Satisfaction Survey result from the employees.



For example, the employee A received three ratings on January (2, 5, 8), the average rating is 5, so I display 5 on that month. I get an array with the averages of the months and put it on the chart. "Average of January, February ...".



Now I need to show not the average, but the amount of avaliations that the employee received on the given month on the Tooltip.



I already have the array prepared with the quantity of each month, but I am not able to display it where I want.



I am trying to show this data on the Tooltip, it comes on an array, but it shows the entire array instead of showing just one per serie.



How can I do that? I have no idea.



Highcharts.chart(pessoa, {
chart: {
type: 'column'
},
title: {
text: pessoa
},
subtitle: {
text: 'Média por mês'
},
xAxis: {
categories: meses,
crosshair: true
},
yAxis: {
min: 0,
title: {
text: 'Média'
}
},
tooltip: {
headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
pointFormat: '<tr><td style="color:{series.color};padding:0">
{series.name}: </td>' +
'<td style="padding:0"><b>{point.y:.2f}</b></td><br> Total:' + R(resposta) + '</tr>',
footerFormat: '</table>',
shared: true,
useHTML: true
},
plotOptions: {
column: {
pointPadding: 0.2,
borderWidth: 0,
stacking: 'normal',
dataLabels: {
enabled: true,
color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'black'
}

}
},
series: [{
name: 'Média',
data: nota1

}]
});


The variable nota1 is the series (the averages).



The chart at the moment







highcharts tooltip






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 14 '18 at 19:03









Jean LimaJean Lima

518




518








  • 1





    Could you prepare a simplified online example of the chart with sample data? Have you tired tooltip.formatter? See api.highcharts.com/highcharts/tooltip.formatter

    – Wojciech Chmiel
    Nov 15 '18 at 7:30














  • 1





    Could you prepare a simplified online example of the chart with sample data? Have you tired tooltip.formatter? See api.highcharts.com/highcharts/tooltip.formatter

    – Wojciech Chmiel
    Nov 15 '18 at 7:30








1




1





Could you prepare a simplified online example of the chart with sample data? Have you tired tooltip.formatter? See api.highcharts.com/highcharts/tooltip.formatter

– Wojciech Chmiel
Nov 15 '18 at 7:30





Could you prepare a simplified online example of the chart with sample data? Have you tired tooltip.formatter? See api.highcharts.com/highcharts/tooltip.formatter

– Wojciech Chmiel
Nov 15 '18 at 7:30












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53307108%2fusing-external-data-on-the-tooltip-highcharts%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53307108%2fusing-external-data-on-the-tooltip-highcharts%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

List item for chat from Array inside array React Native

Thiostrepton

Caerphilly