Author Topic: any way to make a chart?  (Read 10824 times)

0 Members and 1 Guest are viewing this topic.

Dreyth

  • Hero Member
  • *****
  • Posts: 3056
  • Respect: +1056
    • View Profile
    • Email
any way to make a chart?
« on: September 06, 2012, 12:17:39 am »
0
is it possible?

So I've got a food log that looks like this on this site:

Quote
-= Calorie Log =-

FOOD                               CALORIES            PROTEIN            FAT               CARB
5 cups whole milk                 750                     40g                  40g                69g
6 scoops whey protein         720                     144g                 6g                 18g
1 KFC biscuit                         180                     4g                    10g                20g
1 KFC drumstick                    200                     15g                   12g                7g
2 slices of pizza                    540                      26g                   20g               66g
2 shackburgers                    980                      58g                   58g                54g
Total                              +3,370                   287g                146g             234g

BMR: -2,000cal
Walked 6 miles: -600cal
Light shoot around: -100cal
Worked out: -200cal
Thermic effect of food: -300cal
Total: -3,200cal

Balance: +170


Is there anyway to post the whole calroies protein fat carb section in a chart so that everything is nice and perfectly lined up? preferably a choice to use a border or not to.

if there isn't, it'd be a nice addition.
« Last Edit: March 07, 2013, 10:55:18 am by Dreyth »
I'm LAKERS from The Vertical Summit

entropy

  • Hero Member
  • *****
  • Posts: 1684
  • b00m!
  • Respect: +276
    • View Profile
Re: any way to make a chart?
« Reply #1 on: September 06, 2012, 12:35:38 am »
0
I use calorieking and then take a screenshot, then upload it to imgurl and post that in my log.

eg

Goals: Cutting to 6-8% bodyfat

Dreyth

  • Hero Member
  • *****
  • Posts: 3056
  • Respect: +1056
    • View Profile
    • Email
Re: any way to make a chart?
« Reply #2 on: September 06, 2012, 11:32:55 am »
+1
i would do that but i do a lot of copying and pasting. some things i have every day or almost every day, like pizza, protein, and milk. plus it would just be nice and concise. also, i edit my log throughout the day after i eat a few times and/or lift.
I'm LAKERS from The Vertical Summit

Dreyth

  • Hero Member
  • *****
  • Posts: 3056
  • Respect: +1056
    • View Profile
    • Email
Re: any way to make a chart?
« Reply #3 on: March 07, 2013, 10:54:59 am »
+1
adarqui, is it possible?
I'm LAKERS from The Vertical Summit

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 34034
  • who run it.
  • Respect: +9110
    • View Profile
    • Email
Re: any way to make a chart?
« Reply #4 on: March 07, 2013, 11:21:05 am »
+1
adarqui, is it possible?

ya i can do some custom table if you want..

would something like this be acceptable?

http://www.datatables.net/release-datatables/examples/basic_init/zero_config.html

it could have a format like:

Code: [Select]
[chart name="whatever"]
heading1,heading2,heading3,...headingX
value,value,value,...value..
value,value,value,...
[/chart]

or did you mean something else?

with that format you could keep copying your chart and re-posting with new data, and it would be sortable etc..

what you think.

Dreyth

  • Hero Member
  • *****
  • Posts: 3056
  • Respect: +1056
    • View Profile
    • Email
Re: any way to make a chart?
« Reply #5 on: March 07, 2013, 11:34:29 pm »
+1
i mean hey that looks awesome! but really just a standard table would suffice. doesn't even have to show lines or anything... as long as the text can be lined up.

well that would suffice for me, perhaps the other members could make great use of an actual chart like you posted  :headbang:
I'm LAKERS from The Vertical Summit

Dreyth

  • Hero Member
  • *****
  • Posts: 3056
  • Respect: +1056
    • View Profile
    • Email
Re: any way to make a chart?
« Reply #6 on: March 07, 2013, 11:53:00 pm »
+1
basically something analagous to very simply CSS styling would do, with th's and td's
« Last Edit: March 07, 2013, 11:58:43 pm by Dreyth »
I'm LAKERS from The Vertical Summit

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 34034
  • who run it.
  • Respect: +9110
    • View Profile
    • Email
Re: any way to make a chart?
« Reply #7 on: March 08, 2013, 02:55:44 am »
+3
i wrote it at work today in a separate php file, but implementing it into smf's bbcode thing was a bitch.

i mean it's pretty "smart" right now, far from optimal though... this project reminds me why i love nodejs so much.. communicating with php on server side vs javascript on client side is so inefficient...

anyway, i'll adjust it and add some features like possibly auto graphing etc.. might be fun.. also add things like auto totaling the columns at the bottom in a separate 'total' row.... ill also add something like title= and shit.

example.. first 'row' is the headings, the others are data.. only rows that much the 'heading count' will get entered into the table.. you can see in the example below that the 'junk' wont make it in:

[dtable]
date,bodyweight,squat,vert,goku
1/1/2013,150,135,25,2
5/1/2013,160,225,30,4
9/1/2013,165,275,33,6
4/2/2013,165,350,36,8
[/dtable]

Code: [Select]
[dtable]
date,bodyweight,squat,vert,goku
1/1/2013,150,135,25,2
5/1/2013,160,225,30,4
9/1/2013,165,275,33,6
4/2/2013,165,350,36,8
[/dtable]





[dtable]
one,two,three,four,five,six,seven
a,b,c,d,e,f,g
1,2,3,4,5,6,7
2,3,4,5,6,7,8
3,4,5
1
alert('hh');
9,8,7,6,5,4,3,2,1,0
afs
a
f
s
 
 
 mso msdo
 m
[/dtable]


Code: [Select]
test!

[dtable]
one,two,three,four,five,six,seven
a,b,c,d,e,f,g
1,2,3,4,5,6,7
2,3,4,5,6,7,8
3,4,5
1
alert('hh');
9,8,7,6,5,4,3,2,1,0
afs
a
f
s
 
 
 mso msdo
 m
[/dtable]



ooh so much fun:

[dtable]
one,two,three,four,five,six,seven
a,b,c,d,e,f,g
1,2,3,4,5,6,7
2,3,4,5,6,7,8
one,two,three,four,five,six,seven
a,b,c,d,e,f,g
1,2,3,4,5,6,7
2,3,4,5,6,7,8
one,two,three,four,five,six,seven
a,b,c,d,e,f,g
1,2,3,4,5,6,7
2,3,4,5,6,7,8
one,two,three,four,five,six,seven
a,b,c,d,e,f,g
1,2,3,4,5,6,7
2,3,4,5,6,7,8
one,two,three,four,five,six,seven
a,b,c,d,e,f,g
1,2,3,4,5,6,7
2,3,4,5,6,7,8
one,two,three,four,five,six,seven
a,b,c,d,e,f,g
1,2,3,4,5,6,7
2,3,4,5,6,7,8
one,two,three,four,five,six,seven
a,b,c,d,e,f,g
1,2,3,4,5,6,7
2,3,4,5,6,7,8
one,two,three,four,five,six,seven
a,b,c,d,e,f,g
1,2,3,4,5,6,7
2,3,4,5,6,7,8
one,two,three,four,five,six,seven
a,b,c,d,e,f,g
1,2,3,4,5,6,7
2,3,4,5,6,7,8
one,two,three,four,five,six,seven
a,b,c,d,e,f,g
1,2,3,4,5,6,7
2,3,4,5,6,7,8
one,two,three,four,five,six,seven
a,b,c,d,e,f,g
1,2,3,4,5,6,7
2,3,4,5,6,7,8
[/dtable]

vag

  • Hero Member
  • *****
  • Posts: 5993
  • Respect: +3778
    • View Profile
Re: any way to make a chart?
« Reply #8 on: March 08, 2013, 05:45:37 am »
0
+500!!!
Target training paces (min/km), calculated from 5K PR 22:49 :
Easy run : 5:48
Tempo run : 4:50
VO2-max run :4:21
Speed form run : 4:02

---

it's the biggest trick in the run game.. go slow to go fast. it doesn't make sense until it smacks you in the face and you're like ....... wtf?


Dreyth

  • Hero Member
  • *****
  • Posts: 3056
  • Respect: +1056
    • View Profile
    • Email
Re: any way to make a chart?
« Reply #10 on: March 08, 2013, 12:32:12 pm »
0
That shit is awesome!!!

maybe you should add some kind of cell alignment or a way to set the table width. also row/text color. gotta make it look pretty  :lololol:
I'm LAKERS from The Vertical Summit

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 34034
  • who run it.
  • Respect: +9110
    • View Profile
    • Email
Re: any way to make a chart?
« Reply #11 on: March 08, 2013, 12:50:56 pm »
0
That shit is awesome!!!

maybe you should add some kind of cell alignment or a way to set the table width. also row/text color. gotta make it look pretty  :lololol:

coo!

ya i want like

[dtable name=".." width="1-100%" color="..." align="{center,left,right}" ...

also, in cells, i want the ability to like, if you put _tot_ , _avg_, _max_, _min_, it'd figure that out based on the column data above it or the row data to the left... ie, if you have:

blah,1,2,3,tot <- tot cell would be 6

if you have

blah,1,2,3
blax,2,3,4
tota,tot,tot,tot

then it'd be

blah 1,2,3
blax 2,3,4
tota 3,5,7

etc..

i have a few big projects before i recode the entire forum... once i recode the forum tho it's going to be 2050 status. beastcity.

;d

Dreyth

  • Hero Member
  • *****
  • Posts: 3056
  • Respect: +1056
    • View Profile
    • Email
Re: any way to make a chart?
« Reply #12 on: March 08, 2013, 12:57:18 pm »
+2
me so essited
I'm LAKERS from The Vertical Summit