-
Notifications
You must be signed in to change notification settings - Fork 145
Display bugs with rotated labels #218
Comments
Just for context, the change in columns display was made to address this issue: #147
I'm totally open to discussing these changes, and even to partially revert them if it makes sense, but I would like to still fulfil these criteria: Now just for me to understand the issue, are you unhappy with the labels being rotated? Or unhappy with the weird spacing on the right side? Is sticking to an older version an acceptable temporary solution for you right now? (Regarding the Safari scroll/drag issue, that's a bug that is definitively fixable will be addressed) |
hi there! I don't have a problem with orienting labels at different rotations and also want to support many columns. vertical labels are sort of the "limit" I suppose, so the primary complaint was about the non-flush spacing + the ghosting issues that arose with the rotated labels (so strange). I suppose the following expands the scope of the issue to just "display problems" in general but I figure it's relevant as it arises from trying to support the request in #147. I'll follow this repo more closely to stay abreast of active changes and conversation now... I've been working a while siloed away on core functionality and now I'm focusing on improving user-experience which largely depends on hiplot being an amazing tool. On a similar note with a lot of columns: addressing scale of the numbers being presented. When numbers are more than five digits (e.g. over 10k), the leftmost column has its tick labels cut off / unreadable. The "percentile" scale is very helpful in addressing this though it does not get triggered by default. I would think you could make the right-side spacing symmetric on the left side and this way keep the plot symmetric but readable, but I actually feel this would actually make it more difficult to use when the number of columns is high (you want as much horizontal room as possible, whitespace should be avoided), which leads me to propose that the leftmost and rightmost columns are handled in a different manner than all the central ones (for example, displace the location of the vertical column + tickmarks but not points to which the lines are anchored. I messed around with offsets in the web inspector and found that using I published some examples yesterday to make it easier to reference test-cases I'm working on: oracle.math.computer/examples where I've sculpted the URLs to reorder and re-scale columns to maximize initial readability. If you re-run (save -> run) any of the examples, you'll get a "default view" as hiplot's returned html. The images above are from the wasting example. |
The safari bug is definitively on my todo-list (I'll work on that in the coming weeks hopefully)
I'm not sure if we want the percentile scale to apply by default, as it's also distording the scale. Ideally, we want the linear scale to use |
thanks! Makes me unsure I understand what "percent scale" does... I do notice it changes scale, but also notation format. What's the transformation applied there? I guess there's a distinction between format and transforms. log performs a tranform and it seems percent does too, so yeah, something that changes format but preserves distance between points on the axis is indeed a desirable solution. Question is what is better: that or switching label sides? I suppose the latter could lead to unreadable collisions with high number of columns. |
Yes on both
Percentile scale will scale according to values distribution. |
ah I see. that makes a lot of sense. since my data is generated from a uniform distributions, the transformations are barely perceptible. The extreme example is helpful to understand when this would be desirable for readability. so regarding the unreadability issue for long numbers, is the proposed action to scale them to as for the rotated labels, 90º rotations would solve all the problems except that it probably wont look very nice. taking away space from the columns for a label is not ideal either. so, special rules to handle spacing at the rightmost-side? what if the language being used for annotation labels is written right-to-left, I suppose that would mean that you'd handle it similarly on the left side instead? |
reading back on the thread, moving the numbers to the right-side of each axis would be interesting as a solution if the whitespace on the right-side must remain, because it would fill the empty space with numbers (perhaps long ones), though I still think still aesthetically, i dont know if sacrificing that much space is worth it, but perhaps making the minimum rotation a larger number (closer to 90º) would minimize the whitespace. I do understand why this change was made now quite clearly, and am seeking a least-bad solution. I appreciate your prompt responses and explanations very much! |
Yes I believe that's the correct solution
Currently the rotation angle depends on the number of columns (more rotation for more columns). The rightmost column has its font-size scaled down so it fits on the screen
That's indeed something I didn't try at this point, and I don't believe it works out of the box ... |
Reopening for the large numbers representation improvement |
what's the thought around showing numbers on the right side of each axis, making use of the whitespace that's currently there now? will that whitespace stick around? (if you help me get centered with developing on this repo, I actually would be interested in trying out a version that does 90º labels for my use-case to avoid the whitespace) |
Sure. Can you follow the instructions here to get started with developing HiPlot? (let me know if something is unclear, so I can update the doc accordingly) Then what you want to modify is: hiplot/src/parallel/parallel.tsx Lines 692 to 693 in 6930017
|
@danthe3rd I just tried upgrading from After many years... I still think rotation 90 degrees is the best option. Can handle lots of columns and won't cause padding issues. Thoughts? Sorry I never got around to editing the typescript. Just felt really out of my comfort zone back then when I tried it. |
well, I finally figured out how to compile and ship this by parsing the CI/CD config. The website really isn't complete for someone trying to fork it and make changes. this is the bastardized build script that I cobbled together from the circleCI yaml. (I manually edited
rm -rf hiplot/static/built/*
rm -rf dist && mkdir dist pypi-build
mkdir -p npm-build/dist npm-build/dist-dev dist
cp .circleci/hotfixes/internmap.js node_modules/internmap/src/index.js
npm run build-dev
mv dist/* npm-build/dist-dev/
npm run build
npm run prepublish
mv dist/* npm-build/dist/ && mkdir -p hiplot/static/built/ && cp npm-build/dist/hiplot.bundle.js hiplot/static/built/
mkdir -p npm-package/hiplot
cp -r package.json tsconfig.json webpack.config.js README.md LICENSE src npm-build/dist npm-package/hiplot
rm -rf npm-package/hiplot/dist/hiplot-* # Leftover from setup.py
python setup.py sdist bdist_wheel
I managed to rotate labels to vertical and shift the left-side over to make six-figure numbers visible. appreciate you pointing me in the right direction! also patched what I believe is a bug where refreshing the page causes ordering to swap, noticed it as a consequence of trying the latest assignment of .bind(this)).reverse().sort(function(this: ParallelPlot, a: string, b: string) {
const pda = this.state.order.findIndex((e) => e == b);
const pdb = this.state.order.findIndex((e) => e == a);
return (pdb == -1 ? this.state.order.length : pdb) - (pda == -1 ? this.state.order.length : pda);
} |
Original change in #213
Workaround: Use version
<= 0.1.28
(original report in #214 from @mathematicalmichael )
The text was updated successfully, but these errors were encountered: