daemon / mcex-plugin

Minecraft plugin that builds your server's economy and connects it to the global financial market.
MIT License
1 stars 2 forks source link

Web charts latest price #5

Open daemon opened 9 years ago

daemon commented 9 years ago

Web charts need latest price information or some kind of ticker

Siphonophore commented 9 years ago

If the web chart is generated by Java code, you could use the following solution:

When the plugin is enabled, a web chart is generated based on the details outlined in the configuration. Every time the configuration is updated, the plugin can be reloaded and a new web chart could be designed with the latest data.

daemon commented 9 years ago

The charts are already dynamic. By "latest price information," I mean that the charts need to show the last sold price, like what you see on Google Finance.

Siphonophore commented 9 years ago

Oh. Then, don't create continuous instances of the web chart, instead, create an array list, add the newest sold prices to there, and when the plugin is reloaded, the array list is cleaned and the data is posted to a new web chart.

Siphonophore commented 9 years ago

Although, that still doesn't provide real-time information. I guess you'll need to find another type of chart that dynamically updates itself whilst the plugin is running.

daemon commented 9 years ago

I would need to take the latest entry from http://45.79.150.151:2015/charts/DIRT/json and display the price.