Skip to content
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

More Efficient Auto Update? #7

Closed
AlexanderPeters opened this issue Apr 21, 2019 · 6 comments
Closed

More Efficient Auto Update? #7

AlexanderPeters opened this issue Apr 21, 2019 · 6 comments
Labels
question Further information is requested

Comments

@AlexanderPeters
Copy link
Contributor

I'm sure I'm missing something, as I haven't been able to dig as thoroughly into this project as I should; but here's my basic understanding. This repo is a combination of javascript code which runs locally via node and is displayed on a local port: 8080, the code then detects any changes to the data.json file and refreshes the page. The question I have is could some form of API or data pass through be implemented into the code to where I could just pass a JSON file of new points for the graph and each element to be appended onto the end of the graph and later saved to the data.json file (whether this be just the next candle or adding another 20 candles onto the end, same thing just appending to the graph), avoiding the need for a recompile each time I want to add a data point. -Very useful for efficient graph streaming.

@C451 C451 added the question Further information is requested label Apr 21, 2019
@C451
Copy link
Collaborator

C451 commented Apr 21, 2019

My suspicions were right (from the first issue): it seems you are trying to use this repo to develop your app (is it right?).

If you need to embed this lib to your project, just install it with npm. It has an API interface (all you need to build custom charts) and you can update your data from js. But you must do it reactively:

https://github.com/C451/trading-vue-js/blob/master/src/examples/Reactive.vue

If you are talking about the development of the lib itself, yeah, it needs some kind of playground editor that will simplify things. But for now it's TBA.

@AlexanderPeters
Copy link
Contributor Author

Ok, thanks, will look into that.

@Tucsky
Copy link

Tucsky commented Apr 21, 2019

just the next candle or adding another 20 candles onto the end, same thing just appending to the graph), avoiding the need for a recompile each time I want to add a data point.

Big subject, imo. Exposing append & prepend methods would be super useful !
https://github.com/C451/trading-vue-js/blob/8df612c90dac0bde521e08a17afd03f87c13c819/src/components/Chart.vue#L223
Partial rendering of the candles & indicators etc...

@C451
Copy link
Collaborator

C451 commented Apr 21, 2019

just the next candle or adding another 20 candles onto the end, same thing just appending to the graph), avoiding the need for a recompile each time I want to add a data point.

Big subject, imo. Exposing append & prepend methods would be super useful !
trading-vue-js/src/components/Chart.vue

Line 223 in 8df612c

     data: { 

Partial rendering of the candles & indicators etc...

Yeah, I had this idea. The problem here is custom data structures, so user still needs to update all his data fields.

Vue.$set()

is designed specifically for that. But I will think about set/append helpers.

About partial rendering - the bottleneck is not rendering itself, but slicing (when data is huge)

@C451 C451 closed this as completed Apr 25, 2019
@vab2048
Copy link

vab2048 commented Sep 18, 2019

If you need to embed this lib to your project, just install it with npm. It has an API interface (all you need to build custom charts) and you can update your data from js. But you must do it reactively:

https://github.com/C451/trading-vue-js/blob/master/src/examples/Reactive.vue

This link is now 404. Do you have a link to the most recent way of doing this?

@C451
Copy link
Collaborator

C451 commented Sep 30, 2019

@vab2048 Hi, you can find it in earlier versions of the repo, but this example is more relevant: https://github.com/C451/trading-vue-js/blob/master/test/tests/DataHelper.vue

wathanai pushed a commit to wathanai/trading-vue-js that referenced this issue Jun 25, 2021
…et-extensions-0.1.4

Bump websocket-extensions from 0.1.3 to 0.1.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants