Primefaces bar Charts export to JPEG or PNG - primefaces

I am trying to find out Export feature for Bar charts to JPEG/PNG... I didn't find this any where in Prime-faces demo section.
Please let me know if this feature is available in prime faces charts or not.
Also, Please let me know if we have any animation features like fade in/fade out etc...
Please share the examples or URLs on this, if any.
Any thing on this will be much appreciable!!

Primefaces chart components is based on jqPlot charting library , and although this library does not have the export feature , it is possible to achieve it with the help of jquery... (I haven't tried it myself) You can google a bit for export jqplot to png in google and you will see several articles / forum threads about the export of jqplot
here are several
Output plots to PDF/etc.
Export jqplot to PNG <-- got several links inside
export-jqplot-to-png
So basically you need to add commandButton that will call some js code that will generate the image...
I think that it is possible, but don't know how easy it is...
Regarding the animation , again , the jqplot does have some animation look here
I don't know if primefaces got it...
But its not so hard at all to use the original jqPlot charting library with primefaces...
UPDATE
Just noticed that the jqPlot does have the export to image option... look here
so you can ask the primefaces team to upgrade their jqPlot version... or use directly the jqPlot library in your project

The Primefaces chart components don't come with a built-in export feature. There is a JFreeChart integration example that produces charts in png format that can be download with a right-click.
From theory fade-in/fade-out features could be implemented with javascript/jquery.

Related

Google charts piechart Material design

I need to show data in several types of charts and I like the look and feel of the Material design charts over the default google charts.
Linecharts and barcharts work nicely, however, a piechart does not seem to be available in Material design... Or at least.. I can't get it to work.
On this page, Google states that for every corechart, a Material design is available:
https://developers.google.com/chart/interactive/docs/gallery/barchart
Creating Material bar charts In 2014, Google announced guidelines
intended to support a common look and feel across its properties and
apps (such as Android apps) that run on Google platforms. We call this
effort Material Design. We'll be providing "Material" versions of all
our core charts; you're welcome to use them if you like how they look.
Creating a Material Bar Chart is similar to creating what we'll now
call a "Classic" Bar Chart. You load the Google Visualization API
(although with the 'bar' package instead of the 'corechart' package),
define your datatable, and then create an object (but of class
google.charts.Bar instead of google.visualization.BarChart).
On the piechart page, Material design is not mentioned at all:
https://developers.google.com/chart/interactive/docs/gallery/piechart
I have tried to draw the table as explained above, loading 'pie' instead of 'corechart' and loading 'google.charts.Pie' instead of 'google.visualization.PieChart'. This does not work.
Has anyone got a google piechart to work in Material design? Or is it really not available?
Add options theme in function drawChart()
var options = {
theme: 'material'
};

react-native-maps first person view

I am using react-native-maps library with expo to render google maps for android and ios.
At some point, I need to render map in first person view mode, something like this:
I've read react-native-maps documentation and searched github and stackoverflow questions to get an answer but wasn't able to find any.
Can I achieve this using this library?
EDIT:
After many research, I've found #1544 which allows us to rotate map, change view angle, etc.
But there is one little problem, functions animateToBearing and animateToViewingAngle are still working fine, but they are deprecated. And new function animateCamera leads me to another problem

How to render in HTML5 a chart made with FSharp.Charting?

There doesn't seem to be any documentation around this capability from the FSharp.Charting library, which is briefly mentioned in the main webpage in this paragraph:
F# Charting is designed so that the same charting specifications can
be supported when using different charting implementations. For
example, the Try F# charts use similar charting specifications,
implemented using in HTML5 using Dojo Charts.
Any sample around that I can follow?
The documentation is not very clear - what it is trying to say is that F# Charting does not support HTML5, but you can use other libraries that do.
The most advanced one is probably XPlot, which provides wrappers over Google Charts and Plot.ly and in both of the cases, you can get the HTML representation of the chart (and do whatever you want with it).
For example, I used it to display chart in a Suave-based web site:
open XPlot.GoogleCharts
// Create a chart - the API is similar to F# Charting
let chart = Chart.Pie [ for r in results -> r.Option, r.Votes ]
// Get the HTML of the chart (you also need to load Google Charts in JavaScript)
let html = chart.InlineHtml

Custom Google Map overlay?

How can you use a custom tileset/overlay on a Google map, like was done here:
http://www.philaplace.org
That is pretty cool, and I would like to experiment with this.
There are a couple different ways to do it. One way is to create a GTileLayer object and implement the getTileURL() to return the URL pointing to your tiles.
But first you'll need an image that's cut properly in the tile format. For starters, I'd recommend you look at MapTiler: http://www.maptiler.org/ It will cut images for you AND generate a GoogleMap with the overlay.
You'll want to look at Google's Overlays (especially Custom Overlays) and Custom Map Types documentation for Version 3 of their Maps API.

image map software for coordinates using magic wand

Quick question... there are lots of ways to create an image map (old school, I know!) for a web page, but I have a requirement for one. I want to have an interactive map showing UK counties. I have the map, I have "mapspinner" (also dreamweaver) to do the polymap...
but, I was wondering if there was a way to use a magic wand to get the area's coordinates?
I have tried using photoshop export to illustrator paths, but the file doesn't contain any coords (as expected really!).
Does anyone know a way to do this? (I see that fireworks might do it, but I don't have that software)
thanks in advance.
GIMP can do this. See http://docs.gimp.org/en/plug-in-imagemap.html for a tutorial of exactly the task you are trying to accomplish.
I needed to do this, so I wrote an addon for Photoshop to export all coordinates of a path.
You can find it here: https://creative.adobe.com/addons/products/2389
The way to use this with magic wand would be:
create marquee using wand
right click -> Make Work Path..
(rename your path)
(repeat)
(install pathToCoords), go Window -> Extensions -> pathToCoords
click Export
Hope this is useful to someone.