How to hide blank labels on bars in TeeChart - teechart

I have a bar graph where each bar represents a value for a specific date. Since the data does not occur equally spaced in time, I am using an incrementing integer for the X value, and putting the date in as the label value. Some bars do not have a date (the label is empty). The graph shows empty label values as label boxes containing "0", rather than hiding the label boxes for those bars entirely (which would make sense, since the labels are empty, not "0"). Is there any way to instruct TeeChart to remove those unnecessary and confusing label boxes?

Related

Adding controller buttons to prompt text?

I want to make a controller button prompt in my game where it says 'Press X to Join', but I want the X to be an actual graphic of the 'X' button, like how it is in many games. How would I go about doing that? Right now I'm just putting a big space in my prompt text and putting a UI Image of the button in it, but I want to know if there's a better way about it.
For the sake of scaling to different resolution sizes, you would wanna scale the anchors of the UI elements correctly and have an appropriate parent-child relation tree in Unity's hierarchy.
The red box is the hierarchy.
The 2 green boxes shows ways of scaling the anchors.
The orange box shows the end result of it.
Anchors in combination with their relative position, allows Unity's UI elements to scale up and down according to screen size.
So for example if you say that an anchor is at 0.25x, that would be that its anchored at 25% of for example the x axis. Same goes if you set it for the y axis, just the vertical instead of horizontal anchoring.
You can use the anchors to adjust a minimum and a maximum anchor which the elements may float within, they may have the same value as well, then it's a fixed anchor point.
To clarify, I suggest that you use a panel to hold 2 text elements and the image with the X, each text element being on the left and right side of the X instead of having spacing inside the UI text elements. To keep correct spacing you then must use anchor points. This way your spacing stays correct despite changing screen and resolution sizes.
Please note that the "left", "top", "right" and "bottom" values are then relative to the anchor points. So if you move "left" 5 pixels, those 5 pixels will be out from the relative anchor point.
Here's the values I used:
My left text is at 0.25x, right text is at 0.8x, image is at 0.5x.
The panel holding the 3 is at 0.2 minimum x to 0.8 max x, same goes for y axis.
The largest parent panel is stretched to max fit in the canvas.

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.

NSTableView: make total width of all columns always be the width of the visible portion of the table

I have a NSTableView with 2 columns. I'd like to know if there is a way to make it so that the right edge of the right column is always on the right edge of the clip view (so that it never goes beyond the clip view and horizontal scrolling isn't enabled), yet maintaining the ability to resize the two columns by moving the separator between them. This is essentially the same behavior as a split view.
I know IB offers options to control the resizing of columns, but I can't seem to enforce the rule that the total width of the two columns must be the width of the clip view (the visible portion of the table).

Bar Graph with Adaptive Captions

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.

Adding labels to D3 generated circles

I just started learning d3, and very first thing I made is this sorta lame fiddle
Now I wonder how should I attach labels to those circles. Is it possible to nest a label (let's say current radius value) in a circle so it would always move with the circle, or you have to treat labels like independent objects and manage everything accordingly?
You can use a grouping element (<g>) to hold both the circle and the associated text label so they are always together. Then you can position the enter group by using the translate command on the transform attribute (instead of positioning the circle directly as you're doing now).
So basically, you bind the data to the <g> elements instead of to the <circle> elements as you're doing now. Then you can just append a "circle" and a "text" to the "g" (no data join) and both of those child elements will automatically inherit the data themselves.

Resources