-
Greetings, Firstly, I want to thank @RalphSteinhagen et al, for this absolutely brilliant chart library. I'm fairly certain it's one of the most high-performant from any language/platform combined with the flexibility. Hopefully I can become a contributor in the near future. Now, I wanted to see if there was a way of disabling/hiding the Y-axis Ultimately, I'd like to setup consecutive horizontally pasted XYCharts where each chart has an independent time axis so as to leave out large gaps from weekends/evenings/holidays and such. I believe this was a previous discussion in fact (nonlinear time axis), but I think this might be the best solution in my case as I'd be able to generate the charts in parallel using multiple threads (although I haven't tested memory/CPU impact yet). Or do you think it's best that I invest in building a nonlinear time axis and having one XYChart for nonuniform time axis? Right now I'm just using a uniform index for the x-axis, so no time info available (see screenshot below). |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hey, welcome to ChartFx and thanks for your kind words and showing what you are doing with our library. Due to the way the chart is structured at the moment, there are some problems with the way you want to use it:
Regarding performance: since rendering is inherently single threaded and data reduction can already be parallelized, I would expect a single chart to be faster because the scene graph is less complex, but I haven't measured this. For the reasons outlined above, I would try to implement this with one y axis and a single nonlinear time axis (it might e.g. consist of an HBox of sub-axes and some wrapper code to automatically create the sub-axes for the respective range). But If you want to try out the other path, be welcome to share your findings and ask follow up questions when you run into some problem. |
Beta Was this translation helpful? Give feedback.
-
Okay great, thanks a lot for the feedback Alexander. I will try the path of the single non-linear time axis then, seems to be the best solution now that I think of it. Will let you know how I progress here. |
Beta Was this translation helpful? Give feedback.
-
@clisztian thanks for your kind words ... feeling flattered. 😊
You are most welcome to join the fun and we are looking forward to your PRs! 👍 We just need to finish some other things first, but after that wanted to do important upgrades and restructuring of ChartFX that -- among (many) other things -- also includes changes to the scene graph. I.e. aligning charts/axes is something that we are also interested in for our application. The conceptual idea is to also draw the axes on the same canvas as the actual data ... should reduce the (numerical) complexity.
Meanwhile, as Alex already mentioned above, the axes are required to keep track of the ranges and need to be added to the chart. However, their drawing can be disabled by setting the tick-, font/label, and other sizes to '0'. You can also fix the min/max range of the "undrawn" axis to the one that is supposed to remain/to-be-drawn which should give the expected result in case you have 2-3 time ranges. However, this does not really help for
since your use-case would need to potentially exclude many weekends and holidays. Ultimately, you'd need an affine transform between 'time-> pixel' and 'pixel->time' coordinates. The latter mainly for having meaningful pop-ups and tool-tips. Maybe you want to have a look at the PR #456 for inspiration and example of how a simple non-linear transform (2 ranges only) could look like. The bottom chart shows the forward 'f(..)' and backward 'b(..)' affine transformation which basically need to fulfill 'f(b(x))=x'. This shouldn't be to complicated but the handling of multiple time-ranges that need to be excluded need a bit of care/thoughtful design on how to define the multiple ranges to be excluded. Let me know if you need help/or in case we should discuss ideas in-person via our gitter channel or via matrix.io. |
Beta Was this translation helpful? Give feedback.
Hey, welcome to ChartFx and thanks for your kind words and showing what you are doing with our library.
Due to the way the chart is structured at the moment, there are some problems with the way you want to use it: