score:5
Accepted answer
please use this code
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
events: {
load: function() {
this.renderer.image('https://i.stack.imgur.com/E1r9X.png', 200, 20, 163, 187)
.attr({
zIndex:1000 })
.add();
}
}
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}],
exporting: {
enableImages: true
}
});
image{display:none;}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/series-label.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script><div id="container" style="height: 300px"></div>
score:0
A watermark on screen where you can interact with the chart (based on a previous answer) can come from:
//
// add a watermark (where template is the highchart object I'm building)
//
template.chart.events = {
load: function() {
this.renderer.image('https://i.stack.imgur.com/E1r9X.png')
.attr({
zIndex:1000, x:'10%', y:'10%', width:'80%',height:'80%', style:'pointer-events:none' })
.add();
}
};
score:1
You can watermark a picture only when it is downloaded by including that in the exporting options, like this:
exporting: {
chartOptions: {
chart: {
plotBackgroundImage: 'https://i.stack.imgur.com/E1r9X.png'
}
}
}
Highcharts.chart('container', {
chart: {
type: 'bar'
},
title: {
text: 'Stacked bar chart'
},
xAxis: {
categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas']
},
yAxis: {
min: 0,
title: {
text: 'Total fruit consumption'
}
},
legend: {
reversed: true
},
plotOptions: {
series: {
stacking: 'normal'
}
},
series: [{
name: 'John',
data: [5, 3, 4, 7, 2]
}, {
name: 'Jane',
data: [2, 2, 3, 2, 1]
}, {
name: 'Joe',
data: [3, 4, 4, 2, 5]
}],
exporting: {
chartOptions: {
chart: {
plotBackgroundImage: 'https://i.stack.imgur.com/E1r9X.png'
}
}
}
});
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
<div id="container" style="min-width: 310px; max-width: 800px; height: 400px; margin: 0 auto"></div>
Working JSFiddle example: https://jsfiddle.net/ewolden/acL4z2su/2/
Source: stackoverflow.com
Related Query
- I need Highchart watermark image when i download highchart
- How can I render a watermark image in my highchart from local directory?
- Why does my Highchart look different when I transfer my code from Jsfiddle to my server?
- x-axis, y-axis lines does not appear, when I include 3D chart library of HighChart in my code
- Highchart download image is changing aspect ratio
- How to automatically download png file from highchart when the page load
- Highchart spline Cut Off when reach to maximum scale value. How can it fixed?. I have attached may sample code on body
- Legend name and color need to be displayed in the export of highchart as image
- HighCharts - When I download csv, can I switch data source to new one?
- when is a highchart completely loaded?
- Resolve Conflict When Using Highchart and Highmap together (TypeError: ma is not a function)
- Call an angular component method when we click on highchart series
- How to get an image watermark in HighCharts charts?
- Export HighChart as an image in excel file together with the other page contents
- Need to apply background color to each legend text highchart
- Adding image in highchart
- Code works on fiddle but not when I do /show
- How to add a background image (pattern) to highchart column graph?
- Highchart not resized when hidden
- Highchart ticks start point change when categories names are set
- using angular directive to draw highchart pie chart but when i am using it in success function it is not working
- UIWebView download it's image content
- Is there a way how to dynamically create a plotline in highchart when the value is lower than previous one?
- Exception when converting to image from Base-64 string
- Export chart image data locally in HIghchart
- Display Image on xAxis in highchart
- When using canvg to convert Highchart SVG into PNG, all text appears twice - how to solve?
- Highchart does not load data from hidden input when using .val
- highcharts change rendered image source on click
- Need to change title color donut highchart
More Query from same tag
- Highcharts: Offset origin for positive and negative values
- How to save a plot as image on disk from Viewer in RStudio?
- Highcharts Multiseries Gauge with DataLabels at Ends
- Can someone help me to provide space between the time stamps on x-axis
- How can I create a weighted pyramid chart (looks like a pie chart)?
- Checkbox behavior after accessing a post method in rails app
- Multiple Charts not moving in sync at random times when adding value on interval
- Highcharts.stockChart Range Selector (zoom) Button Position After the Chart Container
- Highcharts - no telemetric timeline chart
- How to hide Series Name in HighCharts Tooltip when using pointFormatter
- Highcharts failing to display data
- Highcharts waterfall chart shows unknown number in one series
- Updating a point in a line chart when data grouping is in effect
- Dojo chart not re-rendering to update series
- Highstock - Timeaxis ticks not continuos
- Problem in plotting a map graph using highcharter
- rails and highcharts column chart
- Revert line style in highcharts v4 with null values to old style (v2.2)
- How can I render full chart using PhantomJS?
- Convert Highcharts stacked daily column from "day" to "month" view
- Remove Image/Symbol from Highchart Graph
- Line chart cannot change color use functions
- Merging related timeseries data
- Label individual bars in a grouped bar chart in Highcharts
- How to web scraping Highcharts values?
- Highcharts thinks all dates are 1970-01-01, despite them being valid epoch times
- Why does my HighStock data drop off when I zoom out?
- Dynamic data in Highcharts
- why I am getting undefined value in angular js
- Polar Chart in Higcharts 'negativeColor' not showing properly