I am using angular and google-chart for drawing charts on WEB GUI; I would like to allow user to select a rectangular area of chart and zooming that zone. How can I do that using ? Is it not possible with google-chart, can you suggest another free visualisation tool that supports that ?
Thanks
i believe the configuration option you're looking for is --> explorer
this will provide the default explorer behavior, enabling users to pan horizontally and vertically by dragging, and to zoom in and out by scrolling.
explorer: {}
use the following to allow zoom by dragging across a rectangular area
explorer: {
actions: ['dragToZoom', 'rightClickToReset']
}
note: the option only works with continuous axes (such as numbers or dates).
Related
I used a PieChart in an CodenameOne App and found out, that the labels does not fit on the screen on my iPhone (see screenshot). It's ok on an iPad - but not on smaller devices. I know that I can set a scale-factor - but I think there is no scale factor that fits well for all device sizes.
Is there any solution for this problem?
You can set the label sizes based on millimeter sizes by using convertToPixels from Display or CN. This might not be enough though and you might need to have some special cases to get charts working properly on all devices. You can use features like isTablet and getDensity to tune the behavior to some degree.
Looking at the source for the PieChart, you have a few options here:
Use the renderer's setScale() method to scale the pie chart. This should only affect the radius of the Pie. The default is to make the pie radius 35% of the min(width,height) of the chart component. If you scale it, it will apply that scale. You could check the display width to determine what scale you're going to need so that you only scale on devices that need it.
Use a legend instead of showing the text labels. (i.e. renderer.setShowLegend(true).. and renderer.setShowLabels(false)). Again you can do this selectively based on whether the device is a tablet or a phone.
Does anyone have an example of how to render a forest plot using JFreeChart (or another Java-based open source charting library, but JFreeChart is preferred due to the integration with Jasper Reports)?
See https://en.wikipedia.org/wiki/Forest_plot for description of the forest plot.
I was thinking about hacking somethign together using a horizontal bar chart where left side of the axis is the categorical value, and right side is the range, but the problem is the data for a forest plot comes in a set of data like: category, min, max. Such as an odd ratio with a confidence interval that spans between -.1 to 1.2. The forrest plot would basically be a line drawn between -.1 and 1.2 with a diamond marker directly in the middle (around .55).
If anyone has experience on building this visualization in JFreeChart, it would be much appreciated!
While this is not supported directly in the current release, a reasonable facsimile should be possible. Instead of a bar chart, consider using a MinMaxCategoryRenderer having PlotOrientation.HORIZONTAL and custom icons, as shown here. Add a CategoryMarker or CategoryLineAnnotation with a dashed Stroke to the CategoryPlot for the centerline; add a CategoryItemLabelGenerator to handle the labels.
Why can’t I zoom in a Shield UI Pie Chart? Are there any settings to be enabled? I tried the
zoomMode: 'xy',
property, with no success.
You can’t zoom in on a pie chart. Nor do I see any need to. The only case you might need to do that is if the size of the pie is misset and it is bigger than the chart’s plot. Even if there was some possibility it would be resizing, and not zooming, since all the data is visible constantly.
In a Silverlight application I have large images which have flow charts on them.
I need to handle the clicks on specific hotspots of the image where the flow chart boxes are.
Since the flow charts will always be different, the information of where the hotspots has to be dynamic, e.g. in a list of coordinates.
I've found article like this one but don't need the detail of e.g. the outline of countries but just simple rectangle and circle areas.
I've also found articles where they talk about overlaying an HTML image map over the silverlight application, but it has to be easier than this.
What is the best way to handle clicks on specific areas of an image in silverlight?
Place the Image and a Canvas in a Grid so that the Canvas overlays the Image.
Add shapes of appropriate sizes and placed as needed to the canvas. All shapes will a transparent fill and no border, hence the user only sees the Image. On the Canvas MouseDown (or Up events) use OriginalSource to determine which shape generated the click. Use the Tag property of each shape to associate it with some object that represents the flowchart element being mapped.
I found an easy way to do this without a canvas:
How to get the coordinates of an image mouse click in the event handler?
Is there a way to detect when the mouse goes over a bar in the chart ?
Take a look at ImageMapUtilities. I added mouseover capabilities by drawing custom XYAnnotations over what I wanted the browser to respond to, and specifying the appropriate tooltip/URLs in the annotation.
(the above is particularly useful for a browser)