uniVocity / univocity-trader

open-source trading framework for java, supports backtesting and live trading with exchanges
577 stars 140 forks source link

Support themes for the user interface #25

Open jbax opened 4 years ago

jbax commented 4 years ago

The ChartWindow will fire up a test UI I'm writing in plain java swing.

All colors, fonts and other settings used to plot the charts are currently hard coded in the controller classes. Would be great to be able to save any changes made via UI into a new theme file as well.

These should, in addition to using the given defaults, load a properties or json or maybe a limited CSS file (whatever makes sense) which define a theme. Ideally the user could load the preferred theme on the fly with the program running. This is partly supported already through implementations of the UpdateProcessor interface.

I'm opening this issue if anyone wants to lend a hand here.

weisJ commented 4 years ago

I know this doesn’t exactly relate to the issue of hard coded colour but if you are generally looking for a look and feel you might want to check out darklaf.

jbax commented 4 years ago

Thanks @weisJ, it looks great and I added it to the univocity-trader-chart subproject already.

dev590t commented 3 years ago

Hello @jbax, I have a question that I don't understand. Why have you decided implements univocity-trader-chart with java swing, and not a data visualization library? It will be much easier. It exists many great data visualization lib like https://plotly.com/javascript/, and it is possible to use thought a java API.

I think It exists also java data visualization library, I give the example of plotly because it allow draw interactive and 3D chart. So it could be util for advanced data analysis.

jbax commented 3 years ago

Because I like to control everything and charts in very specific ways.

These libs end up limiting you one way or another, especially if you need speed

On Wed, May 19, 2021, 8:28 AM dev590t @.***> wrote:

Hello @jbax https://github.com/jbax, I have a question that I don't understand. Why have you decided implements univocity-trader-chart with java swing, and not a data visualization library? It will be much easier. It exists many great data visualization lib like https://plotly.com/javascript/, and it is possible to use thought a java API.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/uniVocity/univocity-trader/issues/25#issuecomment-843620863, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWFQPWL3IDWGJ2JAE4GYOTTOLWIBANCNFSM4KFS5ULA .

dev590t commented 3 years ago

@jbax

Because I like to control everything and charts in very specific ways. These libs end up limiting you one way or another, especially if you need speed

I don't know what specific requirement you need. But if the main issue is the speed, maybe you can take a look at SwiftVis2. It is a data visualization library design for the speed, parallelism, big data. The Swing/Java2D version of SwiftVis2 has a good benchmark: https://dynamicsofprogramming.blogspot.com/2018/08/swiftvis2-and-speed-problems-with.html

For more info about the project, https://www.researchgate.net/publication/330845267_SwiftVis2_Plotting_with_Spark_using_Scala https://github.com/MarkCLewis/SwiftVis2

jbax commented 3 years ago

Try recreating what we got there already using a framework like these to see what I mean.

It's usually more work to try and use them. Feel free to submit a pr with your improvement

On Thu, May 20, 2021, 12:24 AM dev590t @.***> wrote:

@jbax https://github.com/jbax

Because I like to control everything and charts in very specific ways. These libs end up limiting you one way or another, especially if you need speed

I don't know what specific requirement you need. But the main issue is the speed, maybe you can take a look at SwiftVis2 https://dynamicsofprogramming.blogspot.com/2018/08/swiftvis2-and-speed-problems-with.html . It is a data visualization library design for the speed, parallelism, big data. The Swing/Java2D version of SwiftVis2 has a good benchmark.

For more info about the project,

https://www.researchgate.net/publication/330845267_SwiftVis2_Plotting_with_Spark_using_Scala https://github.com/MarkCLewis/SwiftVis2

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/uniVocity/univocity-trader/issues/25#issuecomment-844183897, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWFQPTVGVR427RCK2K67ODTOPGKPANCNFSM4KFS5ULA .