score:0
if you want to add a custom property to your data to have it show in the tooltip you need to add to your sourcedata
array. psuedo code below:
var sourcedata = [
<?php
if (($handle = fopen("data.csv", "r")) !== false) {
$i=0;
$len = count(file('data.csv'));
while (($data = fgetcsv($handle, 1000, ",")) !== false) {
if($i==$len - 1){
echo "{x: ".$i.", y: ".$data[1].", extprop: '".$data[4]."'}";
}else{
echo "{x: ".$i.", y: ".$data[1].", extprop: '".$data[4]."'}," ;
}
$i++;
}
fclose($handle);
}
?>
];
you need to change the point object to the {...}
format instead of [...]
. where y
is the yvalue and extprop
is some extended info you want (this property name can be any non-reserved name).
then in your tooltip you need to add this extprop:
tooltip: {
formatter: function () {
console.log(this.point.extprop);
var s = 'the value for <b>' + this.x +
'</b> is <b>' + this.y + '</b>';
if (this.point.extprop) {
s += 'for <b>' + this.point.extprop + '</b>';
}
return s;
}
}
Source: stackoverflow.com
Related Query
- How to pass the another variable to the Highchart basic line which should be dynamic
- Highchart how to animate from the xaxis bottom line upward
- How center the value 0[threshold], the line which separates positive and negative value?
- How to make two charts using highchart show up in the same line side by side using div
- How to add a vertical plot line in multiple line series and show the tooltip on Plot line in highchart
- How to change color on the Highchart Sparkline line only?
- Highchart basic bar : How to know which specific bar section is clicked?
- In highchart how to plot the line in 3d container
- How to pass a JSON through a variable to highchart heatmap data tag?
- How to add line which runs through origin (from positive to negative) on a scatterplot - highchart
- How add the straight line between bubbles in highchart
- How do I pass a PHP variable from one file to another multiple times?
- how to pass the dates to the x-axis in the base line high charts instead of the values
- Should show all the series name on hover to the point which is crossing to that point in line chart (Highcharts)
- How to rotate javascript highchart line graph -90 degree without affecting the data values
- How to display basic line graph in Highchart for multiple categories' data from csv?
- how to get basic line highchart dynamically through json data
- How to display highchart series line marker symbol from tooltip formatter?
- How to change the font family of Highchart to Bootstrap css default font family
- How to export a Highchart chart to PDF thanks to a button outside the chart?
- Highchart Area Range chart with gradient that follows the line
- How to know information about the clicked bar in highchart column r shiny plot
- How can I do in Highchart to have 1px space between the columns and the y Axis?
- how to remove the base line on the yaxis of highcharts?
- How can I extend the lines of this Highchart series to the edges of my chart area?
- Highchart - line or area not starting at the left point
- how to pass values to tooltip which not in x and y axis in highcharts
- Highchart (basic line chart) which can have multiple values vs x axis?
- How to customize the crosshair Line for Highcharts
- Is there a way how to dynamically create a plotline in highchart when the value is lower than previous one?
More Query from same tag
- Connected charts in highcharts
- HighCharts how to add live series data set to existing chart
- SetData() not working on Change Event HighCharts Pie Chart
- Chart Is not displaying Created Using HighCahrts and Google Analytics
- highcharts remove gap (column) with zero value
- Highcharts Multi-Depth 3d pie chart
- JS Highcharts table - How to set Category name
- Highcharts, how to use gradient without setting a color?
- highcharts jquery dynamic change chart type column to bar
- Highcharts Solid Gauge only want to show 1 data label
- Highcharts plotlines above area using DOM
- is supportablerange type graph in Highchart?
- Among Fusion Charts,High Charts,EXTJs Charts better
- Missing documentation on generated HTML5 of jasperreports-highcharts
- Highchart's x-axis not displaying correct data
- How should I parse dateTime for Highcharts?
- How to set 30 seconds interval for datetime on y-axis for highcharts JS
- How to show only one pair of linked Highcharts series at a time
- PHP and MySQL, get JSON data to feed HighCharts
- Two data points on same day
- How do you set the text-overflow property of a highcharts-legend-item to ellipsis in styled mode?
- Set background color to HighChart xAxis labels
- How to offset HighCharts data?
- redraw pie chart in highchart
- Highcharts, chart with two series starting in diferent points, how yo show single column?
- Make the chart display current year in HighChart
- Dynamically Take input from text-areas in a jquery ui custom pop up box for Tooltip in highcharts
- HighCharts: Reaching options of other charts from point event
- Improving rCharts performance when plotting thousands points
- Legend name and color need to be displayed in the export of highchart as image