Skip to content

Commit

Permalink
small fix to background selection color default
Browse files Browse the repository at this point in the history
  • Loading branch information
stevewirts committed Feb 18, 2015
1 parent 651ef70 commit 335f0ce
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 13 deletions.
6 changes: 3 additions & 3 deletions fin-hypergrid-renderer.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@
theme.topLeftFont = '14px Tahoma, Geneva, sans-serif';
theme.topLeftColor = 'rgb(25, 25, 25)';
theme.topLeftBackgroundColor = 'rgb(223, 227, 232)';
theme.topLeftFGSelColor = 'rgb(255, 220, 97)';
theme.topLeftFGSelColor = 'rgb(25, 25, 25)';
theme.topLeftBGSelColor = 'rgb(255, 220, 97)';

theme.fixedColumnFont = '14px Tahoma, Geneva, sans-serif';
theme.fixedColumnColor = 'rgb(25, 25, 25)';
theme.fixedColumnBackgroundColor = 'rgb(223, 227, 232)';
theme.fixedColumnFGSelColor = 'rgb(255, 220, 97)';
theme.fixedColumnFGSelColor = 'rgb(25, 25, 25)';
theme.fixedColumnBGSelColor = 'rgb(255, 220, 97)';

theme.fixedRowFont = '14px Tahoma, Geneva, sans-serif';
theme.fixedRowColor = 'rgb(25, 25, 25)';
theme.fixedRowBackgroundColor = 'rgb(223, 227, 232)';
theme.fixedRowFGSelColor = 'rgb(255, 220, 97)';
theme.fixedRowFGSelColor = 'rgb(25, 25, 25)';
theme.fixedRowBGSelColor = 'rgb(255, 220, 97)';

theme.backgroundColor2 = 'rgb(201, 201, 201)';
Expand Down
2 changes: 1 addition & 1 deletion fin-hypergrid.min.html

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions q/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
T must be a keytable containing at least two columns in addition to the keys, f and g.

At least one of f and g must be a groupable type (see below).

The behavior of the treetable is controlled by a set of global variables in the root:

/ the underlying data table, e.g.
T:([k:til 10]f:10?1.;g:10?`a`b`c)

/ qtypes
Q::.tt.qtype T

/ count of Z
N::count Z

/ visible order
F::cols[T]except G

/ group by
G:()

/ groupable
H::exec c from meta get T where t in"bhijspmdznuvt"

/ invisible (can be rolled up)
I::cols[T]except G,F

/ rollup functions
A:()!()

/ instruction state
P:([n:enlist(0#`)!0#`]v:enlist 1b)

/ rows -> gui
R:`start`end!0 100

/ sorts (a,d)
S:()!()

Example settings (used in the demo):

/ group on these columns
G:`sector`trader`strategy

/ roll up these columns
F:`holdingId`symbol`price`quantity`date`time

/ override default rollup with avg
A[`price]:(avg;`price)


Binary file modified q/s1.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion q/s1/u.q
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ T:([tradeId:til n]
trader:n?trader;
strategy:n?strategy;
price:{0.01*"i"$100*x}20+n?400.;
quantity:(100*10+n?20)-2000;
quantity:-50+n?100;
date:2000.01.01+asc n?365;
time:09:30:00.0+n?06:30)

Expand Down
Binary file modified q/s2.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion q/s2/u.q
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ T:([tradeId:til n]
trader:n?trader;
strategy:n?strategy;
price:{0.01*"i"$100*x}20+n?400.;
quantity:(100*10+n?20)-2000;
quantity:-50+n?100;
date:2000.01.01+asc n?365;
time:09:30:00.0+n?06:30)

Expand Down
Binary file modified q/s3.zip
Binary file not shown.
16 changes: 10 additions & 6 deletions q/s3/u.q
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
\p 12346
\P 14
\c 25 150
\t 200
\t 1000

\l t.q
\l w.q
Expand All @@ -18,24 +18,28 @@ sector:`energy`materials`industrials`financials`healthcare`utilities`infotech
strategy:`statarb`pairs`mergerarb`house`chart`indexarb

n:1000000
T:([tradeId:til n]
T:([tradeId:til n];
holdingId:n?holdingId;
symbol:n?symbol;
sector:n?sector;
trader:n?trader;
strategy:n?strategy;
price:{0.01*"i"$100*x}20+n?400.;
quantity:(100*10+n?20)-2000;
quantity:-50+n?100;
date:2000.01.01+asc n?365;
time:09:30:00.0+n?06:30)

G:`sector`trader`strategy
F:`holdingId`symbol`price`quantity`date`time
m:10
f:`$"f",'string til m
T:1!flip(flip 0!T),f!(m,n)#1000*-.5+(n*m)?1.

G:`sector`trader`strategy`symbol
F:`holdingId`price`quantity`date`time,f
A[`price]:(avg;`price)
A[`tradeId]:(.tt.nul;`tradeId)

/ define Z
.js.set()!();

/ update
.z.ts:{update price:price+-.5+count[T]?1.,quantity:quantity+-5+count[T]?10 from`T;.js.ups`price`quantity;}
.z.ts:{T[::;`quantity]+:-5+n?10;T[::;`price]+:-.5+n?1.;T[::;f]+:(n,m)#1000*-.5+(n*m)?1.;.js.ups`price`quantity,f;}
3 changes: 2 additions & 1 deletion q/s3/v.q
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ $[.z.K<3.3;

.z.ws:{.js.rcv .js.sym .j.k x}

/ javascript utilities
/ utilities

.js.sym:{$[(t:abs type x)in 0 99h;.z.s each x;10=t;`$x;x]}
.js.sub:{flip each(1#x;.js.row[1_x]. R`start`end)}
.js.row:{$[y>=count x;0#x;((1+z-y)&count r)#r:y _ x]}
Expand Down

0 comments on commit 335f0ce

Please sign in to comment.