Welcome, Guest. Please login or register.

Author Topic: [REWARD 3000 NXT+] JS Charts for DGEX  (Read 284 times)

0 Members and 1 Guest are viewing this topic.

Offline blindshot

  • Fresh Nxter
  • *
  • Posts: 18
    • View Profile
Re: [REWARD 3000 NXT+] JS Charts for DGEX
« Reply #15 on: December 04, 2013, 03:13:34 AM »
Nice. A properly formatted version now at

http://dgex.com/ticker4.cgi

Oooh you're going to hate me!
I decided to use Google Charts as it's more flexible and it's pretty sweet you can check it out here:

http://milo-media.net/nxtGChart/index.html

I just need to get it to pull form a datasource. But basically this is how the ticker.cgi should be formatted. (i think it would be easier for you anyway and you'll be transferring a lot less data this way)

Code: [Select]
[
[new Date(2013, 12 ,3, 9, 58, 56), 0.00000970, 1500.00000000],
[new Date(2013, 12 ,2, 8, 54, 56), 0.00001148, 34.00000000],
[new Date(2013, 12 ,1, 6, 52, 56), 0.00001000, 100000.00000000],
[new Date(2013, 11 ,30, 5, 58, 56), 0.00001150, 8.00000000],
[new Date(2013, 11 ,29, 4, 58, 56), 0.00000900, 1.00000000],
[new Date(2013, 11 ,28, 2, 58, 56),0.00000900,527.00000000],
[new Date(2013, 11 ,26, 4, 58, 56),0.00000900,35111.00000000],
[new Date(2013, 11 ,25, 14, 58, 56),0.00000750,23900.00000000],
[new Date(2013, 11 ,24, 3, 58, 56),0.00000750,76000.00000000],
[new Date(2013, 11 ,23, 22, 58, 56),0.00000750,100.00000000],
[new Date(2013, 11 ,22, 12, 58, 56),0.00000995,8500.00000000],
[new Date(2013, 11 ,21, 1, 58, 56),0.00001185,10000.00000000],
[new Date(2013, 11 ,20, 3, 58, 56),0.00001175,10000.00000000],
[new Date(2013, 11 ,19, 6, 58, 56),0.00001165,10000.00000000],
[new Date(2013, 11 ,18, 9, 58, 56),0.00001160,10000.00000000],
]

With just that data set we can also make multiple charts.
Let me know what you think, workign on the data feed now, if you can get some data in that format we can soon see some magic happen!
I <3 NXT
15445598412937451762

Offline blindshot

  • Fresh Nxter
  • *
  • Posts: 18
    • View Profile
Re: [REWARD 3000 NXT+] JS Charts for DGEX
« Reply #16 on: December 04, 2013, 05:10:04 AM »
K it's working now with a local source with the format I gave you, so just let me know if you need a zipped upload of the files.
You'll need to have them on your server so you don't run into cross origin issues.
I <3 NXT
15445598412937451762

Offline Graviton

  • Administrator
  • Nxter
  • *****
  • Posts: 51
    • View Profile
Re: [REWARD 3000 NXT+] JS Charts for DGEX
« Reply #17 on: December 04, 2013, 07:55:35 AM »
Please let me see a demo of static data or your local data source.

Offline starik69

  • Fresh Nxter
  • *
  • Posts: 10
    • View Profile
Re: [REWARD 3000 NXT+] JS Charts for DGEX
« Reply #18 on: December 04, 2013, 11:17:14 AM »
Code: [Select]
{ "time": "2013-12-04 09:36:24",
"unitprice": 0.00001395,
"units": 854.47500000
},
How do you get decimals in nxt volume? ???
648774468

Offline blindshot

  • Fresh Nxter
  • *
  • Posts: 18
    • View Profile
Re: [REWARD 3000 NXT+] JS Charts for DGEX
« Reply #19 on: December 04, 2013, 02:11:30 PM »
Please let me see a demo of static data or your local data source.

Hey, sorry had to get to bed early was completely knocked out.
The source is like the excerpt in my last post, you can see the actual file it's pulling from here http://milo-media.net/nxtGChart/ticker.cgi .
I <3 NXT
15445598412937451762

Offline starik69

  • Fresh Nxter
  • *
  • Posts: 10
    • View Profile
Re: [REWARD 3000 NXT+] JS Charts for DGEX
« Reply #20 on: December 04, 2013, 05:02:36 PM »
I made a chart in googledocs. it is auto updating every 15 minutes.

https://docs.google.com/spreadsheet/ccc?key=0AmpuZa3xuvmzdFVVZjRrRi1zYXdwSENsaFRkd3lCTmc&usp=sharing
648774468

Offline Graviton

  • Administrator
  • Nxter
  • *****
  • Posts: 51
    • View Profile
Re: [REWARD 3000 NXT+] JS Charts for DGEX
« Reply #21 on: December 04, 2013, 09:07:34 PM »
Hey, sorry had to get to bed early was completely knocked out.
The source is like the excerpt in my last post, you can see the actual file it's pulling from here http://milo-media.net/nxtGChart/ticker.cgi .
Ok but I'd like to see a demo of the chart in action please? So I can basically copy-paste it to DGEX. Overwhelmed currently and charts are feverishly needed.

Offline blindshot

  • Fresh Nxter
  • *
  • Posts: 18
    • View Profile
Re: [REWARD 3000 NXT+] JS Charts for DGEX
« Reply #22 on: December 05, 2013, 08:33:51 AM »
Hey sorry for the late reply been busy and also had to fix a nuisance on the chart, it would flicker on updates, which is a known annotated timeline issue. Flicker is gone now and it's nice and smooth.

So just to put everything in one spot.

   - The demo of the chart in action is here: http://milo-media.net/nxtGChart/index.html
   - The source file for the demo is here: http://milo-media.net/nxtGChart/ticker.cgi
   - The sourcecode can be downloaded here: http://milo-media.net/nxtGChart/NXTGCharts.zip

So as you can see from the ticker.cgi, the format is smaller and lighter. Just note that the params for new Date are (year, month, day, hour, minute, second) and also that the months are represented from 0 - 11 not 1 - 12.

Let me know if you have any questions about the code.
Thanks

UPDATE:  I seperated the custom code to its own .js file so that it's neater and so that browsers/cdn or whatever can cache it so the .zip now has a new .js file in tehre.
« Last Edit: December 05, 2013, 08:56:32 AM by blindshot »
I <3 NXT
15445598412937451762

Offline Graviton

  • Administrator
  • Nxter
  • *****
  • Posts: 51
    • View Profile
Re: [REWARD 3000 NXT+] JS Charts for DGEX
« Reply #23 on: December 05, 2013, 10:20:07 AM »
Excellent, looking good! I was already getting anxious. Aiming to install today and have you compensated rightaway :)

Offline blindshot

  • Fresh Nxter
  • *
  • Posts: 18
    • View Profile
Re: [REWARD 3000 NXT+] JS Charts for DGEX
« Reply #24 on: December 05, 2013, 05:27:06 PM »
Excellent, looking good! I was already getting anxious. Aiming to install today and have you compensated rightaway :)

Nice, let me know when it's up, will be nice to see it with a live large data source and thanks for the NXT.

There are some aesthetic options you can play with like line thickness, and colors of each line (right now blue and red). Not sure where it will end up so wasn't sure what colors to put.

Alright baack to work lol, talk soon
I <3 NXT
15445598412937451762