score:2
It works slow, because you are using Highcharts, where displaying 2000 points isn't the best idea. I suggest to use Highstock instead, where points are grouped to display average/sum/etc. of points group.
However, here you are demo
And code: http://jsfiddle.net/me5Uf/2/
$('#container').highcharts({
xAxis: {
type: 'datetime'
},
plotOptions: {
series: {
marker: {
enabled: false
},
dataLabels: {
enabled: true,
formatter: function () {
if (this.point.options.showLabel) {
return this.y;
}
return null;
}
}
}
},
series: [{
name: 'AAPL',
data: data,
tooltip: {
valueDecimals: 2
}
}]
}, callback);
});
function callback(chart) {
var series = chart.series[0],
points = series.points,
pLen = points.length,
i = 0,
lastIndex = pLen - 1,
minIndex = series.processedYData.indexOf(series.dataMin),
maxIndex = series.processedYData.indexOf(series.dataMax);
points[minIndex].options.showLabel = true;
points[maxIndex].options.showLabel = true;
points[lastIndex].options.showLabel = true;
series.isDirty = true;
chart.redraw();
}
Source: stackoverflow.com
Related Query
- Highcharts, minimum, maximum with additional label
- Highcharts label format with tickPositioner in a datetime x Axis
- Highcharts - Global configuration with common code and unique data & Headings
- highcharts add plotline label with images
- HighCharts PieChart with just one segment doesn't show a label
- Exporting with custom data label image in highcharts gantt
- In Highcharts drilldown charts, Custom Formatting of X-Axis label displays the label with underline even in the last level
- passing formatting JavaScript code to HighCharts with JSON
- Dynamic Highcharts with maximum xaxis points
- Highcharts with datetime and also additional data (tooltip text)
- Highcharts - x-axis label disappears for polar chart with any endAngle
- highcharts xaxis datetime label with minor tick
- Highcharts display label for pie chart using html table as data source
- Highcharts : set a maximum number of ticks with a fixed interval
- Include additional highcharts source data in angular2 app
- Highcharts - Plot by week with and label formatter
- Highcharts - XAxis Label with LineFeed - how to make smaller gap?
- Dynamic quadrant label positions with Highcharts
- Add a Specific Y-Axis Label with Highcharts
- Highcharts drilldown to pie chart - Clicking on axis label with multiple series causes pie charts to overlap
- Highcharts series visibility with csv data source
- highcharts not displaying line when last point is before current x Axis minimum and next point is after current X Axis maximum
- Highcharts column with drilldown results in blurred data label in main chart, except for the drilled down columns
- How to have multiple highcharts with different series data in vuejs without repeating code
- highcharts y axis label with offset is hidden when chart has no title
- How can I make Highcharts label a datetime X-axis with relative dates?
- How to replace label line with dot in highcharts
- Incorrect minimum and maximum in highcharts
- Inserting mouseover event to custom label created with SVGRenderer, highcharts
- Why code of Horizonal line(y-axis) on a single in Highcharts get applied to all other charts integrated with Webdatarocks
More Query from same tag
- How to make - - legend in 'areaspline' type high charts?
- How can I style highchart select to look like hover?
- Place Highstock inside a SVG
- Get xAxis extremes before fire afterSetExtremes in higcharts
- Highcharts - where to place style and changing style for one wedge in a pie chart
- Replace axis labels with custom in highcharts r
- angular2-highcharts click on point, open user input, display user input in annotation
- JQuery mobile and highcharts integration
- highcharts StockChart pass multiple values to tooltip
- How to find max: value of colorAxis for highMaps drilldown maps
- how to get index of chart in multiple highchart container
- JSON string to Highcharts
- Heatmap values are lapsing in Highcharts
- how to update renderer.text() in highcharts after a graph has been drawn?
- highcharts custom colors and tootip point color
- Highchart multiple axes - sync axes on multiple charts
- Highcharts tooltip is hidden behind other charts
- Difference between "highcharts-angular" and "angular-highcharts" node modules (for Angular v7)
- Highcharts Columns with empty columns
- Angular: HighChart TreeMap is not updating with the new data
- Adding highchart3d in Angular 6 application
- Highcharts data series label. for each data point
- HighCharts DataLabels Overlap
- Can we change highcharts legend to work as radio button instead of checkbox style?
- Day vs Time on Scatter plot
- Error with PhantomJS when installing Highcharts export server on Azure VM (Ubuntu 20.04)
- adding a highchart into wordpress
- Highchart is not defining angular 9
- how I can get a static tooltip on a plotline, highstock?
- Add border on highcharts bar chart on start of bar