I am using the highcharts javascript library with the column chart. What I am trying to do is show an image in a tooltip when the user rolls over the column. I am able to show images, but not the one I want.
I have an array of image links
var imagesLinks = ["img1","img2","img3","imgN"];
What I am trying to do is show the image based upon which column they are on so if they on the first column it would show imagesLinks[0], third column would show imageLinks[img3] etc.
Basically I need to know how to get the column index. I found this code below that helps me get the images on click, but it does not really help with the tooltip.
plotOptions: {
column :{
point:{
events:{
click:function(){
console.log(this.x);
}
}
}
}
},
I have found the answer.
Inside the formatter function you use this.point.x
Related
is there a way to made the value of "total" in the middle of doughnut chart instead part of the chart itself, I've try to create in a different series, but it won't work in doughnut chart. its very useful for me since the actual data keep update in 1 minute
data range selected A1:B4
enter image description here
One approach would be to create a scorecard chart using total value and overlay it on the doughnut chart.
So I have 3 values which are, Percent, Target, and Overtime.
I want to show on the chart the percent with overtime as one stacked column chart, but for the target, I want to make it show as one line as it will be like a fixed value.
I have tried a lot but it didn't work for me at all. Does anybody have any idea how to get this working, please?
Here is the sheet for the chart: https://docs.google.com/spreadsheets/d/1pSyWYMzDFGDNkDTfv1LMurcsvrN6bx3GjxVbmqFijk8/edit#gid=0
Is this were you looking for?
Chart editor: in Customize tab on Series setting you can change each one of [Percent,Target,Overtime] specifically to be type [line, column, or more] to make combo chart
I hope it'll help you
I wanna show several series in one chart, and I only wanna the first series to be shown by default. The other series's data shouldn't be fetched until the according legend is clicked, so that the loading speed will be faster.
Only when the according Legend is clicked, then the chart will use AJAX to fetch data and show it, Can highcharts do that?
I have seen several similar questions about lazyload, but they are all using highstock, can highcharts.js do it?
What I need is to show a different valuesuffix for each chart type value based on a unique array for each series.
I have considered the answer in this question and created this jsfiddle.a
It will only work when the tooltip is displayed for one series at a time. If I set the series tooltip to be shareda, it will not work.
Any ideas?
For tooltip shared with multiple series, you need to loop the points like this in order for the tooltip to work.
Edited: Added valuePrefix
I m using Dotnet Highchart. I m getting data from a data base table which has 10 columns in total and using its two columns to display chart.
I need to show all 10 columns in tooltip (sort of summary), but I dont have an idea if it can be done or not ? Can you please guide me how to pass data of all columns to table and display in tooltip ?
Thanks for your time and help.
if you are maintaining the entire data to be plotted in a separate list/array you can access it from the formatter function of the tooltip
tooltip: {
formatter: function() {
//apply your logic here like a regular js method
//the returned value will be displayed on tooltip
return this.y;
}
}
refer api documentation : http://api.highcharts.com/highcharts#tooltip.formatter
Hope this will help you.