Bar Graph with Adaptive Captions - amcharts

I would like to have a graph in amCharts where the x-axis is the time and bars represent in different colors and heights representing events in time. Now I would like to have that zoom-able so that captions in the bars only appear if there is enough space to display them.
In my example picture the caption is not displayed on the magenta bars:
:

I would try to do this with a date-based serial chart. You could try using a separate step line for each column with fillAlpha set to 1 or one step graph and use fillColorsField and set color in your data at a position where color should be changed. As for labels, it's more complicated - graph has hideLabelsCount property, but it will show/hide all labels once certain zoom level is reached. You could try employ labelFunction of a graph and usesome function which would set label to empty string, depending on zoom level.

Related

Animation with Matplotlin for Bar Graph, Horizontal Graph, etc

I have a text file that is constantly updating a single value. I'm trying to display this value using matplotlib's animation but I'm having lots of issues.
For example I want to show a value that's changing every second on the text file (value ranges from 0 to 150) and I want the height of bar graph to increase and decrease with this value.
I want to do the same with horizontal graph. I also want to show a dot moving around the circle for different values (between 0 and 360).
I've tried to many things but it constantly broke the code or matplotlib froze. I've been trying to use matplotlib's animation.
Any help would be appreciated.

Color picker by a color tree

Sorry for the bad title I don't really know how could I write it better. I want to create a colorpicker that's not very typical. There is the version where you can select the three vectors of HSB. It would be close to it but not at all. The main problem is why I don't use the usual colorpickers is that I have a very specific space to do it. I have 35 free objects that could be colored (these are filled circles with a black border) and not more. But I can place each object wherever I want. So how I imagine there would be a circle of 12-18 objects that are constats they would represent the HUE than when I select one the rest of the objects would be in the HUE circle and they would form a square. And why I call it tree: because you could select a color from the main circle than you get colors from that branch than you click on one of the colors in the got colors than you get colors from that color (but the clicked color is always part of the "zoomed" colors the best how you can imagine this like there is the HSB color space and in the first two clicks you select the HUE than you just zoom in the HSB color space than there is the two dimensional 101*101 S and B square and we zoom on the color. I really hope that you can understand me if not ask anything. And thank you for reading this long text.
Something like this:
The first, must know what is equation of HSB Color. The Algorithm to find this is in this with name HSV.
If you found, You can fill each color with choosen formula with hue you choosen and full saturation.
Add listener of click for that circle.
In listener, update the cicle inside with your choosen saturation and brighness. For example first row is sqaturation and brightness is column. Then in row 1 is no saturation, row 2 is half saturated(50) and row 3 is full saturated ones. The column 1 is the brightmost one(100) the 2 is half(50) and 3 is no brightness (0), for example.
Aclually it is not a tree, but a alternative approach for standard approach because it's more like that than tree.

Zoomable scatter chart

In Qlikview 11 I managed to set up (amongst others) a nice scatter chart without any major problems. Now I would like to be able to zoom into a region in that chart. Intuitively this could be accomplished by selecting a rectangular region with the mouse. Incidentally this works fine in "regular" line or bar charts. The new x and y axis regions correspond to the selected rectangle. However this does not happen with my scatter chart. I suspect this has something to do with the way dimensions are handled in scatter charts. For easier understanding I appended to screen-shots of the status quo - or how I don't want it to be.
Full chart with selected region http://img801.imageshack.us/img801/4873/6ccc.png
Chart displaying only the selected data http://imageshack.us/a/img138/9053/kck5.png
From what it looks like, I would guess that the scatter plot has hard coded axis max and mins. Check the "Axes" tab under chart properties, and uncheck the scale boxes. That should allow the chart to zoom in.

jqPlot change axis tick labels colors individually

In jqPlot, is it possible change the color of the axis tick labels individually?
For example, I want them all black, except I want two of them to be blue. Is this possible?
You can see that even examples and options we can provide a single font family, color to all of the ticks, you only can define different colors for different series in your jqplot charts

jqPlot axis with ticks labeled differently from underlying data

So I am using jqPlot to display distance (y-axis) over time (x-axis) in a simple line graph.
However, while I have actual distances as the underlying data used to position the points, I'm not interested in displaying those distances on the y-axis.
Instead, there are a series of landmarks at given distances, that I want to appear on the y-axis as a 'tick' next to the appropriate point for the distance to that landmark. That way the line appears to "pass" each landmark as it travels upward.
Currently I'm "faking" this by hiding the ticks and putting a manually-created series of labels next to the graph. This works well enough, but I had to disable vertical zooming because if the user chose to zoom in, the labels would not match up with the actual distances. My users would really like to zoom in vertically, however, and I want to allow them to.
Therefore, does anyone know of a way (a plugin or similar) that would allow me to associate custom labels with given tick marks in jqPlot, that will match up nicely and respond to zooming? It would be necessary to hide some of the landmarks if the graph is zoomed out too much, so that would have to be a feature.
Alternatively, if someone knows of a "zoom event" that passes in the min and max y values, I could probably recreate my manual labels with that data, so let me know if you know of a way to get that information. I haven't been able to find one.
I would need to see a bit of your code to customize it to the distance but to start with you could label the ticks and it will display over the size of the chart.
axes:{yaxis:{ticks:['DiscanceA','DiscanceB', 'DiscanceC', 'DiscanceD', 'DiscanceE'],
renderer: $.jqplot.CategoryAxisRenderer,},
Let me know how it goes and if you have any code lets see it!

Resources