-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Horizontal bars (on vertical arrays) #95
Comments
Another thing: should it be possible to have control whether the array indexing starts from top or bottom/left or right? |
Yes, this all sounds good! And yes, it should be possible to index either top to bottom, or bottom to top. "direction" seems like a reasonable name to me, if you are restricting things to left vs. right and up vs. down. However, when you say "rotate the array into any direction" did you literally mean "any"? As in, giving an angle and letting the element rotate? I think there is a good version of this concept, and a version that is not viable. The issue has to do with the orientation of the labels with respect to the data structure. What you show above looks ideal, in that for a bar array, there are four basic arrangements. So this is not "any" rotation. Independent from this, it would be nice if any collection of graphical objects could be rotated. So for example, I might want to take the upward-growing bar graph in your first image on the left above, and turn it 45 degrees clockwise (labels and all). |
I did mean any of the directions in the images. Here's what I'm thinking for the value of
So, for example,
This is already possible already with |
It is a little confusing in that the second and third parameters appear to swap meaning, depending on the value of the first parameter. I can live with that, though it would be nice if that didn't happen. A bigger problem is this: If I understand you, the second/third parameter (depending on the value of the first) is attempting to control label placement with respect to the associated bar. The problem here is that I can think of several possibilities for label placement. (Note, these are not "index labels" as I would interpret that term, they are the array values. The indices relate to the position in the array, and appear separately. I will use the term "value labels" below to separate the two.) Let's just consider the default layout, where the bars are vertical, and the indexing starts on the left. Where do the value labels go? The default is within the bar, at the bottom. But I could imagine that any of these alternatives might be viable: (1) Under the bar (that is where the index labels typically go). (2) Inside the bar, but at the top (or even the middle?). (3) Above the bar. I can accept an argument that none of those choices make much sense except at the inside/bottom (unless the value labels replace the index labels, and appear below the bars). But if you make that argument, what is the point of the third parameter? In all four of your images, the value labels appear inside the bar at the relative "base".
Fair enough. :) |
That's true. Actually, the direction of the indexing could be specified with the existing As for the different possible positions of the value labels, I'd prefer JSAV placing the values inside the bars like it now positions them. If a more specific positioning is required, AV developers can change that position with CSS. And I really did mean that the the direction option would control both array value labels and index labels position. For example, for the default array layout, setting direction to |
I'm having trouble seeing the degrees of freedom. Once I decide to have bars that grow downwards (your right-most figure), what options are there about positioning the array values and array indices? Don't the values (if they appear) have to be inside at the top of the bars? And if the array indices appear, don't they have to be above the bars? The only choice is whether they go left to right, or right to left, correct? Assuming that I have this right, then for the array indices, whether they appear is independent of whether they go left to right or right to left in the rightmost figure. So you can't replace the boolean in the This is surprisingly difficult! |
You're absolutely right, how could I miss that? So there needs to be yet another option for the order of the indices. That could simply be a boolean flag indicating whether to use the default index direction or to reverse it. Those seem like the only choices that make sense. Anyway, I suggest we open another issue for that feature and here focus on the horizontal bar array which, I'm assuming, is needed soon. If the |
Sounds good. |
It should be possible to have vars on vertical array (which makes the bars horizontal).
The text was updated successfully, but these errors were encountered: