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
- Highcharts more than one series
- Highcharts not updating data on ajax response data
- Highcharts: Heatmap using CSV
- Highcharts - Permanent, Draggable Selection Box
- Highcharts v3.0.1 problems with rotating data labels in IE8 and jQuery v1.7.1
- div poistion on html css
- I change the min and max of the xaxis, but how to i change the 'navigator'?
- Update highcharts with new set of data
- Highstock - Remove bottom date tooltip from line chart
- Wrong date in highstock Chart
- highcharts render black on ajax refresh
- Disable specific labels in Highcharts
- highcharts line not fully plotted
- How do i add mouse wheel code in Angular2 highcharts in typescript
- Highcharts Heat map not displaying data yet correctly labelling
- Highcharts heatmap chart labels render extremely slow
- Json structure for highcharts with PHP/MySQL
- HighCharts: set specific border width and border color dynamically for one column
- Highcharts maps (even samples) don't work
- Moving from highcharts 3.0 to 4.0: grouped column weird behavior
- Highcharter shiny events - Returning multiple selected points to a dataframe
- Highcharts tooltips flickering ON IE8
- Highcharts Sankey diagram issue
- Highcharts line chart from a Google spreadsheet
- How to get region/province code from IP address
- HighCharts Column Overlapping
- Format content of array (to match Highcharts requirements)
- How to convert xts object in JSON in R?
- how to have customized tooltip,when plot has two series
- Highcharts annotations text to print in graph