-
Notifications
You must be signed in to change notification settings - Fork 82
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
Autorotate xAxisLabel to 45˚ #454
Conversation
Tested it a bit, found problems:
|
Fixed:
It'll not rotate on polar coordinate system, because of else if. |
# Conflicts: # src/apps/weblib/canvas.yaml # src/apps/weblib/interface.js # src/apps/weblib/ts-api/cvizzu.types.d.ts # src/apps/weblib/ts-api/module/ccanvas.ts # src/apps/weblib/ts-api/module/module.ts # src/apps/weblib/ts-api/render.ts # test/integration/test_cases/test_cases.json # test/integration/test_cases/web_content/analytical_operations/compare/stream_stacked.mjs # test/integration/test_cases/web_content/analytical_operations/filter/stream_1.mjs # test/integration/test_cases/web_content/analytical_operations/filter/stream_2.mjs # test/integration/test_cases/web_content/analytical_operations/sum/stream_stacked.mjs # test/integration/test_cases/web_content/cookbook/rendering/sparse_axis_labels.mjs # test/integration/test_cases/ww_samples_for_presets/cartesian_coo_sys/32_C_A_stream_graph.mjs # test/integration/test_cases/ww_samples_for_presets/cartesian_coo_sys/34_C_A_violin_graph.mjs # test/integration/test_cases/ww_samples_for_presets/cartesian_coo_sys/36_C_A_range_area_chart.mjs # test/integration/test_cases/ww_samples_for_presets/without_coo_sys/602_W_R_heatmap3.mjs
The xAxis label default left/right padding will be 6/12, based on the latest commit tests. I will go through all failing test cases, and I will create a new test for this feature. |
Conclusion: The current padding is not a good measure for checking the texts to be close to each other, because currently, it contains the axis "padding" too. Because of that (and the axis padding will be hard to implement), we thought that the easiest is to measure half of the padding. |
It works now: |
if (options.setColor) | ||
canvas.setTextColor(*style.color * options.alpha); | ||
|
||
auto textSize = canvas.textBoundary(text); | ||
auto textSize = Gfx::ICanvas::textBoundary(font, text); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This way we set the html canvas font more time than before, which could increase the rendering time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't think that this would be a lot of increase though...
No description provided.