In the browser you can use a charting library that renders to <canvas> such as chart.js
Then once you have rendered your chart on the canvas you can obtain the image data as PNG or JPG:
var canvas = document.getElementById('myCanvas'); var dataURL = canvas.toDataURL("image/png");
This will give you a base64 encoded uri of the image that you could use with an html image:
var imgElement = document.getElementById('myImg'); imgElement.src = dataURL;
You can also directly get the image data from the canvas:
var imgData = canvas.getContext('2d').getImageData(0, 0, canvas.width, canvas.height);
- Library that creates graphs and exports as image
- d3.js - stacked graphs that are both zoomed in and out/scrolled when using scrollwheel/drag on either graph
- Draw svg points from geoJSON query and image using d3 library
- Are directed graphs only possible with files that contains a "source" and "target" value?
- I have an image that has a hover effect, but there is a text above and it avoids it
- I want to use charts and graphs for visualizing data.Need some recommendation as D3js that I am using is not responsive
- Linking parallel coordinates to an image and making change in that image
- Auto width and height for SVG image
- How to create floor plans that work nice with mobile and desktop browsers?
- Draw imbricated blocks that are rotated and fliped with d3.js
- Bidirectional flow between D3.js frontend and Python Backend? / Interactive graphs in a website
- Comparision for D3.js vs zingChart library for visualizations and charting
- dagre-d3 how to click node and run an event after that
- Mix bar and line charts with Rickshaw (d3 based graphing library for js)
- How can I get the natural width and height of an svg image element?
- Creating choropleth map legend that correctly displays quantile class range values and associated color in color scheme?
- JS- how to remove duplicate JSON nodes and add one link for all nodes that get merged
- Loading a huge image (5mb) into svg background leads to pixelation and performance issues
- NVD3.js line graphs fail to scale y axis to max and min values
- How do I tweak binning for dc.js and crossfilter? Is that the performance bottleneck?
- How do I replace a node with an image using D3 and CoffeeScript for a network visualization?
- How to destroy multiple C3 graphs that were built from the same original function
- Multiple graphs in one single page using angularjs and d3.js
- Hierarchy is returning heights and lengths that are NaN
- Using D3 and blobs to render svg to image
- How do I add bubbles on each of the y-axis values that I have and how do I add mouseover function for each of them?
- How to export multiple html tables and multiple d3 generated graphs into a single pdf
- How to plot graphs using networkx and d3py
- Fade links and nodes that are not immediately connected to the node hovered on in a d3 graph
- How to create semi circle with d3.shape that start at 9pm and ends at 6am
More Query from same tag
- d3.js Line Chart with a barchart
- Bar overlapping in DC bar chart
- Is there any way to convert Matplotlib figure objects to SVG or D3 graph?
- how to get d3.event.Y as location in a <g> element
- d3.js Add a circle in d3.geo.path
- D3 adding multiple children to the same parent
- render svg from d3.js on non-svg supported browsers, especially IE 8?
- How is the distance between the nodes / length of the link between the nodes defined in a forceSimulation d3?
- D3 charts change the time format and its display on the axes
- D3 Relative Position Logic, Selections, and Translating
- D3 Candlestick chart date on xaxis
- How to set count to zero for missing keys in D3 nest()
- How to create speedometer in D3JS?
- Understanding "call" in D3.js with force-directed layouts
- Dj3 rotation how can i merge?
- Resetting D3s transform attributes
- Displaying crossover only in d3.js Slankey (Dynamic, Interactive)
- Append child only to new elements, D3.js
- How to calculate SVG Linear Gradient
- Looking for a better way to alter the color of axis components in d3.js v4
- What is the maximum value for the .duration() command in d3.js?
- how to use zoom.wheelDelta in d3 v4
- D3 : best way to find max value in a JSON object
- How to expand child from JSON, load data after click parent - D3.Js - force directed layout
- d3 radar chart in v5, cannot render 'path' object
- How to implement on click function to D3 pie chart
- Updating the column type of a large dataset in d3.js
- "marker-mid" is not working with path d3.js force layout
- brush extents not working as expected
- Append conditionally without filtering