├── style
├── Free Fonts.URL
├── fonts
│ ├── AstGlyphs.eot
│ ├── AstGlyphs.otf
│ ├── AstGlyphs.ttf
│ ├── AstGlyphs.woff
│ └── AstGlyphs.svg
├── style.css
└── demo.html
├── orig fonts
├── ASTGLY.TTF
├── ASTGLY.vfb
├── ASTPI1.TTF
├── AstGlyphs.otf
├── AstGlyphs.ttf
└── AstGlyphs.vfb
├── tools
└── build.php
├── .gitattributes
├── README.md
├── src
├── loader.js
├── configuration.js
├── cartwheel.js
├── datacalc.js
└── drawables.js
├── charts
├── compat.json
├── solararc.json
├── transits.json
├── progressed.json
├── composite.json
├── transits2.json
├── harmonic.json
├── relocation.json
└── natal.json
├── .gitignore
├── js
├── modernizr.min.js
└── astrow.js
└── index.html
/style/Free Fonts.URL:
--------------------------------------------------------------------------------
1 | [InternetShortcut]
2 | URL=http://www.font2web.com/freestuff.html
3 |
--------------------------------------------------------------------------------
/orig fonts/ASTGLY.TTF:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjnoyes/html5chart/HEAD/orig fonts/ASTGLY.TTF
--------------------------------------------------------------------------------
/orig fonts/ASTGLY.vfb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjnoyes/html5chart/HEAD/orig fonts/ASTGLY.vfb
--------------------------------------------------------------------------------
/orig fonts/ASTPI1.TTF:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjnoyes/html5chart/HEAD/orig fonts/ASTPI1.TTF
--------------------------------------------------------------------------------
/orig fonts/AstGlyphs.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjnoyes/html5chart/HEAD/orig fonts/AstGlyphs.otf
--------------------------------------------------------------------------------
/orig fonts/AstGlyphs.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjnoyes/html5chart/HEAD/orig fonts/AstGlyphs.ttf
--------------------------------------------------------------------------------
/orig fonts/AstGlyphs.vfb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjnoyes/html5chart/HEAD/orig fonts/AstGlyphs.vfb
--------------------------------------------------------------------------------
/style/fonts/AstGlyphs.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjnoyes/html5chart/HEAD/style/fonts/AstGlyphs.eot
--------------------------------------------------------------------------------
/style/fonts/AstGlyphs.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjnoyes/html5chart/HEAD/style/fonts/AstGlyphs.otf
--------------------------------------------------------------------------------
/style/fonts/AstGlyphs.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjnoyes/html5chart/HEAD/style/fonts/AstGlyphs.ttf
--------------------------------------------------------------------------------
/style/fonts/AstGlyphs.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cjnoyes/html5chart/HEAD/style/fonts/AstGlyphs.woff
--------------------------------------------------------------------------------
/tools/build.php:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 |
5 | window.cjnoyessw = window.cjnoyessw || {};
6 |
7 | (function () {
8 |
9 | var __360DEGREES = 21600;
10 |
11 |
24 |
25 | }());
26 |
27 |
28 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 | *.sln merge=union
7 | *.csproj merge=union
8 | *.vbproj merge=union
9 | *.fsproj merge=union
10 | *.dbproj merge=union
11 |
12 | # Standard to msysgit
13 | *.doc diff=astextplain
14 | *.DOC diff=astextplain
15 | *.docx diff=astextplain
16 | *.DOCX diff=astextplain
17 | *.dot diff=astextplain
18 | *.DOT diff=astextplain
19 | *.pdf diff=astextplain
20 | *.PDF diff=astextplain
21 | *.rtf diff=astextplain
22 | *.RTF diff=astextplain
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | html5chart
2 | ==========
3 |
4 | Astrology charts in Html5 canvas
5 |
6 | This project came out of work I did in a C++ astrology application Astro For Windows, I wanted to be able to do
7 | the graphics in javascript and web technologies and move from a fat client to thin client model.
8 |
9 | It uses custom webfonts and json data sources.
10 |
11 | The code has a sample page and sample json charts, which can show how to use and implement this technology in
12 | your project.
13 |
14 | The source in src is combined using the build.php in tools, I think it is overkill to build this with requirejs.
15 |
--------------------------------------------------------------------------------
/src/loader.js:
--------------------------------------------------------------------------------
1 |
2 | window.cjnoyessw.loader = window.cjnoyessw.loader || {
3 |
4 |
5 | getData : function() {
6 | return this.__data;
7 | },
8 |
9 | getChartHeader : function() {
10 | return this.__chartHeader;
11 | },
12 |
13 | getFileHeader : function() {
14 | return this.__fileHeader;
15 | },
16 |
17 | load : function(source, callback) {
18 | var hr = $.getJSON(source, function(data) {
19 | data.data.chartIndex=0;
20 | window.cjnoyessw.loader.__data = data.data;
21 | window.cjnoyessw.loader.__chartHeader = data.chartheader;
22 | window.cjnoyessw.loader.__fileHeader = data.fileheader;
23 | if (callback != undefined) {
24 | callback("success");
25 | }
26 | }).fail(function() {
27 | if (callback != undefined) {
28 | callback("fail");
29 | }
30 | });
31 | }
32 |
33 | };
34 |
35 |
36 |
--------------------------------------------------------------------------------
/style/style.css:
--------------------------------------------------------------------------------
1 | /** Generated by FG **/
2 |
3 |
4 | @font-face {
5 | font-family: 'AstGlyphsWF';
6 | src: url('fonts/AstGlyphs.eot');
7 | src: local('☺'), url('fonts/AstGlyphs.woff') format('woff'), url('fonts/AstGlyphs.ttf') format('truetype'), url('fonts/AstGlyphs.svg') format('svg');
8 | font-weight: normal;
9 | font-style: normal;
10 | }
11 |
12 | body {
13 | background-color: #000020;
14 | color: white;
15 | }
16 |
17 |
18 | #right {
19 | position: absolute;
20 | top:20px;
21 | bottom:0px;
22 | right:0px;
23 | }
24 |
25 | #header {
26 | font-size:14pt;
27 | width:100%;
28 | height:75px;
29 | }
30 |
31 | #formdiv {
32 | position: absolute;
33 | top: 10px;
34 | left: 10px;
35 | bottom: 0px;
36 | width: 190px;
37 | }
38 |
39 |
40 | #offscreen {
41 | position:absolute;
42 | top: -1000px;
43 | left: -500px;
44 | font-family: 'AstGlyphsWF';
45 | }
46 |
47 | #chart {
48 | font-family: 'AstGlyphsWF';
49 | }
--------------------------------------------------------------------------------
/charts/compat.json:
--------------------------------------------------------------------------------
1 | {"chartheader":{"strType":"Compatability","type":27,"strLongType":"Compatability Graphics","version":65247},"data":{"datapoints":[],"layoutoptions":0,"numcharts":0,"numother":12,"other":{"minutes":[372,372,3900,-21336,19215,823,5026,21113,-10007,-13913,-9999,-3487,-14287,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"houseproc":"Placidus","housecusps":[372,2172,3972,5772,7572,9372,11172,12972,14772,16572,18372,20172],"birthtimeknown":0,"time2":"1:17 PM","time1":"3:45 AM","numgridaspects":0,"gridaspects":[],"date2":"3/27/1966","tropside":"Tropical","name1":"Christopher J. Noyes","name2":"David Kennedy","date1":"3/29/1958"},"maxpt":12,"natal":{"minutes":[9899,520,6968,1640,19363,18553,-12542,15940,-7659,-12844,-9012,-12763,-1963,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"houseproc":"Placidus","housecusps":[9899,11349,13108,15129,17205,19086,20699,549,2308,4329,6405,8286],"aspects":[],"birthtimeknown":0,"time2":"1:17 PM","time1":"3:45 AM","numgridaspects":0,"numaspects":0,"gridaspects":[],"date2":"3/27/1966","tropside":"Tropical","name1":"Christopher J. Noyes","name2":"David Kennedy","date1":"3/29/1958"},"numdata":0,"strType":"Compatability","numtext":0,"strLongType":"Compatability Graphics","aspectglyphs":0},"fileheader":{"name":"Christopher J. Noyes & David Kennedy","filename":"Christopher J. Noyes & David Kennedy; Compat.ASGRA","strType":"Compatability","type":27,"comment":"Compat","strLongType":"Compatability Graphics"}}
2 |
--------------------------------------------------------------------------------
/style/demo.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | @font-face Demo
6 |
7 |
36 |
37 |
38 |
39 | The quick brown fox jumps over the lazy dog.
40 |
41 |
42 |
43 |
44 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/charts/solararc.json:
--------------------------------------------------------------------------------
1 | {"chartheader":{"strType":"Solar Arc","type":40,"strLongType":"Solar Arc Graphics","version":65247},"data":{"datapoints":[],"layoutoptions":0,"numcharts":0,"numother":12,"other":{"minutes":[12629,3211,9662,4332,455,21244,15233,18631,10350,15535,11703,15454,4654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"houseproc":"Placidus","housecusps":[0,0,0,0,0,0,0,0,0,0,0,0],"birthtimeknown":0,"time2":"","time1":"3:45 AM","numgridaspects":0,"gridaspects":[],"date2":"00/00/46","tropside":"Tropical","name1":"Christopher J. Noyes","name2":"","date1":"3/29/1958"},"maxpt":12,"natal":{"minutes":[9938,520,6971,1641,19364,18553,-12542,15940,-7659,-12844,-9012,-12763,-1963,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"houseproc":"Placidus","housecusps":[9938,11391,13152,15175,17250,19129,20738,591,2352,4375,6450,8329],"aspects":[],"birthtimeknown":0,"time2":"","time1":"3:45 AM","numgridaspects":7,"numaspects":0,"gridaspects":[{"aspect":-1,"second":2,"first":12629},{"aspect":-1,"second":9,"first":3211},{"aspect":-1,"second":12,"first":9662},{"aspect":-1,"second":10,"first":4332},{"aspect":-1,"second":7,"first":455},{"aspect":-1,"second":7,"first":21244},{"aspect":-1,"second":4,"first":15233}],"date2":"00/00/46","tropside":"Tropical","name1":"Christopher J. Noyes","name2":"","date1":"3/29/1958"},"numdata":0,"strType":"Solar Arc","numtext":0,"strLongType":"Solar Arc Graphics","aspectglyphs":0},"fileheader":{"name":"Christopher J. Noyes","filename":"Christopher J. Noyes; Solar Arc.ASGRA","strType":"Solar Arc","type":40,"comment":"Solar Arc","strLongType":"Solar Arc Graphics"}}
2 |
--------------------------------------------------------------------------------
/charts/transits.json:
--------------------------------------------------------------------------------
1 | {"chartheader":{"strType":"Transits","type":28,"strLongType":"Transits Graphics","version":65247},"data":{"datapoints":[],"other":{"minutes":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"houseproc":"Placidus","housecusps":[7597,8948,10553,12470,14570,16593,18397,19748,21353,1670,3770,5793],"birthtimeknown":0,"time2":"12:00 AM","time1":"1:17 PM","numgridaspects":0,"gridaspects":[],"date2":"12/27/2008","tropside":"Tropical","name1":"David Kennedy","name2":"today","date1":"3/27/1966"},"numother":0,"transits":[{"minutes":[-1,16548,16349,17569,19317,16195,17870,10304,20946,19337,16265,-18672,-7872,-1,-1,-1,-1,-17375,-15038,-695,-16401,28713,-1785,22678,16282,-30356,-13676,-288,-16401],"numaspect":18,"aspects":[{"aspect":4,"second":1,"first":1},{"aspect":1,"second":7,"first":3},{"aspect":1,"second":9,"first":3},{"aspect":0,"second":4,"first":4},{"aspect":4,"second":9,"first":4},{"aspect":2,"second":11,"first":6},{"aspect":1,"second":12,"first":6},{"aspect":4,"second":13,"first":6},{"aspect":4,"second":14,"first":6},{"aspect":3,"second":7,"first":7},{"aspect":1,"second":9,"first":7},{"aspect":4,"second":9,"first":9},{"aspect":1,"second":1,"first":11},{"aspect":2,"second":2,"first":11},{"aspect":1,"second":5,"first":11},{"aspect":2,"second":1,"first":12},{"aspect":1,"second":2,"first":12},{"aspect":2,"second":5,"first":12}],"maxpt":12,"date":"12/27/2008"}],"maxpt":17,"strLongType":"Transits Graphics","numcharts":1,"layoutoptions":0,"natal":{"minutes":[7597,405,4332,-21313,19245,848,5030,21117,-10006,-13912,-9998,-3486,-14286,1670,12470,11524,15490,6837,0,0,0,0,0,0,0,0,0,0,0,0],"houseproc":"Placidus","housecusps":[7597,8948,10553,12470,14570,16593,18397,19748,21353,1670,3770,5793],"aspects":[],"birthtimeknown":256,"time2":"12:00 AM","time1":"1:17 PM","numgridaspects":0,"numaspects":0,"gridaspects":[],"date2":"12/27/2008","tropside":"Tropical","name1":"David Kennedy","name2":"today","date1":"3/27/1966"},"strType":"Transits","numdata":0,"numtext":0,"aspectglyphs":0},"fileheader":{"name":"David Kennedy","filename":"David Kennedy; Transits.ASGRA","strType":"Transits","type":28,"comment":"Transits","strLongType":"Transits Graphics"}}
2 |
--------------------------------------------------------------------------------
/charts/progressed.json:
--------------------------------------------------------------------------------
1 | {"chartheader":{"strType":"Progressed","type":29,"strLongType":"Progressed Birth Graphics","version":65247},"data":{"datapoints":[],"layoutoptions":0,"numcharts":0,"numother":17,"other":{"minutes":[10043,2870,16665,1726,247,2734,5438,21392,-9934,-13853,-9953,-3352,-14152,4573,15373,2238,19145,9825,0,0,0,0,0,0,0,0,0,0,0,0],"houseproc":"Placidus","housecusps":[10043,11620,13426,15373,17328,19174,20843,820,2626,4573,6528,8374],"birthtimeknown":0,"time2":"","time1":"1:48 PM","numgridaspects":17,"gridaspects":[{"aspect":-1,"second":4,"first":14152},{"aspect":-1,"second":11,"first":4573},{"aspect":-1,"second":5,"first":15373},{"aspect":-1,"second":10,"first":2238},{"aspect":-1,"second":7,"first":19145},{"aspect":2,"second":8,"first":1},{"aspect":2,"second":10,"first":1},{"aspect":4,"second":1,"first":2},{"aspect":2,"second":8,"first":5},{"aspect":2,"second":10,"first":5},{"aspect":0,"second":3,"first":7},{"aspect":1,"second":11,"first":7},{"aspect":0,"second":8,"first":8},{"aspect":0,"second":10,"first":8},{"aspect":4,"second":4,"first":9},{"aspect":2,"second":7,"first":9},{"aspect":0,"second":9,"first":9}],"date2":"42/00/00","tropside":"Tropical","name1":"David Kennedy","name2":"","date1":"3/27/1966"},"maxpt":17,"natal":{"minutes":[7981,406,4349,-21312,19246,849,5030,21117,-10005,-13912,-9998,-3486,-14286,2156,12956,11924,15869,7283,0,0,0,0,0,0,0,0,0,0,0,0],"houseproc":"Placidus","housecusps":[7981,9366,11016,12956,15031,17008,18781,20166,216,2156,4231,6208],"aspects":[],"birthtimeknown":256,"time2":"","time1":"1:48 PM","numgridaspects":12,"numaspects":0,"gridaspects":[{"aspect":-1,"second":2,"first":10043},{"aspect":-1,"second":10,"first":2870},{"aspect":-1,"second":5,"first":16665},{"aspect":-1,"second":9,"first":1726},{"aspect":-1,"second":9,"first":247},{"aspect":-1,"second":10,"first":2734},{"aspect":-1,"second":11,"first":5438},{"aspect":-1,"second":8,"first":21392},{"aspect":-1,"second":2,"first":9934},{"aspect":-1,"second":4,"first":13853},{"aspect":-1,"second":2,"first":9953},{"aspect":-1,"second":10,"first":3352}],"date2":"42/00/00","tropside":"Tropical","name1":"David Kennedy","name2":"","date1":"3/27/1966"},"numdata":0,"strType":"Progressed","numtext":0,"strLongType":"Progressed Birth Graphics","aspectglyphs":0},"fileheader":{"name":"David Kennedy","filename":"David Kennedy; Progressed-0.ASGRA","strType":"Progressed","type":29,"comment":"Progressed","strLongType":"Progressed Birth Graphics"}}
2 |
--------------------------------------------------------------------------------
/charts/composite.json:
--------------------------------------------------------------------------------
1 | {"chartheader":{"strType":"Composite","type":34,"strLongType":"Composite Graphics File","version":65247},"data":{"datapoints":[],"layoutoptions":0,"numcharts":0,"numother":0,"other":{"minutes":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"houseproc":"Placidus","housecusps":[0,0,0,0,0,0,0,0,0,0,0,0],"birthtimeknown":0,"time2":"1:17 PM","time1":"5:01 PM","numgridaspects":0,"gridaspects":[],"date2":"3/27/1966","tropside":"Tropical","name1":"Harvey Milk","name2":"David Kennedy","date1":"5/22/1930"},"maxpt":12,"natal":{"minutes":[3651,2011,12550,-12378,12217,1054,4972,-18990,5423,11481,8238,-2686,-13486,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"houseproc":"Placidus","housecusps":[372,2172,3972,5772,7572,9372,11172,12972,14772,16572,18372,20172],"aspects":[],"birthtimeknown":0,"time2":"1:17 PM","time1":"5:01 PM","numgridaspects":69,"numaspects":0,"gridaspects":[{"aspect":3,"second":2,"first":1},{"aspect":1,"second":8,"first":1},{"aspect":1,"second":13,"first":1},{"aspect":2,"second":14,"first":1},{"aspect":4,"second":16,"first":1},{"aspect":2,"second":17,"first":1},{"aspect":0,"second":3,"first":2},{"aspect":0,"second":4,"first":2},{"aspect":2,"second":6,"first":2},{"aspect":2,"second":8,"first":2},{"aspect":10,"second":10,"first":2},{"aspect":2,"second":13,"first":2},{"aspect":1,"second":14,"first":2},{"aspect":1,"second":17,"first":2},{"aspect":0,"second":4,"first":3},{"aspect":2,"second":6,"first":3},{"aspect":2,"second":8,"first":3},{"aspect":2,"second":13,"first":3},{"aspect":1,"second":14,"first":3},{"aspect":1,"second":17,"first":3},{"aspect":3,"second":5,"first":4},{"aspect":2,"second":6,"first":4},{"aspect":2,"second":8,"first":4},{"aspect":1,"second":10,"first":4},{"aspect":1,"second":17,"first":4},{"aspect":10,"second":39,"first":4},{"aspect":1,"second":6,"first":5},{"aspect":1,"second":7,"first":5},{"aspect":10,"second":8,"first":5},{"aspect":3,"second":9,"first":5},{"aspect":2,"second":10,"first":5},{"aspect":5,"second":11,"first":5},{"aspect":8,"second":12,"first":5},{"aspect":6,"second":13,"first":5},{"aspect":7,"second":14,"first":5},{"aspect":10,"second":16,"first":5},{"aspect":7,"second":17,"first":5},{"aspect":10,"second":40,"first":5},{"aspect":2,"second":7,"first":6},{"aspect":0,"second":8,"first":6},{"aspect":1,"second":10,"first":6},{"aspect":9,"second":12,"first":6},{"aspect":10,"second":14,"first":6},{"aspect":7,"second":16,"first":6},{"aspect":7,"second":8,"first":7},{"aspect":2,"second":9,"first":7},{"aspect":3,"second":10,"first":7},{"aspect":4,"second":11,"first":7},{"aspect":4,"second":12,"first":7},{"aspect":6,"second":10,"first":8},{"aspect":6,"second":11,"first":8},{"aspect":7,"second":12,"first":8},{"aspect":2,"second":13,"first":8},{"aspect":1,"second":14,"first":8},{"aspect":8,"second":16,"first":8},{"aspect":1,"second":17,"first":8},{"aspect":9,"second":40,"first":8},{"aspect":1,"second":10,"first":9},{"aspect":8,"second":11,"first":9},{"aspect":5,"second":12,"first":9},{"aspect":7,"second":13,"first":9},{"aspect":6,"second":14,"first":9},{"aspect":6,"second":17,"first":9},{"aspect":0,"second":36,"first":9},{"aspect":9,"second":41,"first":9},{"aspect":4,"second":11,"first":10},{"aspect":4,"second":12,"first":10},{"aspect":10,"second":32,"first":10},{"aspect":10,"second":13,"first":11}],"date2":"3/27/1966","tropside":"Tropical","name1":"Harvey Milk","name2":"David Kennedy","date1":"5/22/1930"},"numdata":0,"strType":"Composite","numtext":0,"strLongType":"Composite Graphics File","aspectglyphs":0},"fileheader":{"name":"Christopher J. Noyes & David Kennedy Solar","filename":"Harvey Milk & David Kennedy; Composite.ASGRA","strType":"Composite","type":34,"comment":"Composite","strLongType":"Composite Graphics File"}}
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #################
2 | ## Eclipse
3 | #################
4 |
5 | *.pydevproject
6 | .project
7 | .metadata
8 | bin/
9 | tmp/
10 | *.tmp
11 | *.bak
12 | *.swp
13 | *~.nib
14 | local.properties
15 | .classpath
16 | .settings/
17 | .loadpath
18 |
19 | # External tool builders
20 | .externalToolBuilders/
21 |
22 | # Locally stored "Eclipse launch configurations"
23 | *.launch
24 |
25 | # CDT-specific
26 | .cproject
27 |
28 | # PDT-specific
29 | .buildpath
30 |
31 |
32 | #################
33 | ## Visual Studio
34 | #################
35 |
36 | ## Ignore Visual Studio temporary files, build results, and
37 | ## files generated by popular Visual Studio add-ons.
38 |
39 | # User-specific files
40 | *.suo
41 | *.user
42 | *.sln.docstates
43 |
44 | # Build results
45 |
46 | [Dd]ebug/
47 | [Rr]elease/
48 | x64/
49 | build/
50 | [Bb]in/
51 | [Oo]bj/
52 |
53 | # MSTest test Results
54 | [Tt]est[Rr]esult*/
55 | [Bb]uild[Ll]og.*
56 |
57 | *_i.c
58 | *_p.c
59 | *.ilk
60 | *.meta
61 | *.obj
62 | *.pch
63 | *.pdb
64 | *.pgc
65 | *.pgd
66 | *.rsp
67 | *.sbr
68 | *.tlb
69 | *.tli
70 | *.tlh
71 | *.tmp
72 | *.tmp_proj
73 | *.log
74 | *.vspscc
75 | *.vssscc
76 | .builds
77 | *.pidb
78 | *.log
79 | *.scc
80 |
81 | # Visual C++ cache files
82 | ipch/
83 | *.aps
84 | *.ncb
85 | *.opensdf
86 | *.sdf
87 | *.cachefile
88 |
89 | # Visual Studio profiler
90 | *.psess
91 | *.vsp
92 | *.vspx
93 |
94 | # Guidance Automation Toolkit
95 | *.gpState
96 |
97 | # ReSharper is a .NET coding add-in
98 | _ReSharper*/
99 | *.[Rr]e[Ss]harper
100 |
101 | # TeamCity is a build add-in
102 | _TeamCity*
103 |
104 | # DotCover is a Code Coverage Tool
105 | *.dotCover
106 |
107 | # NCrunch
108 | *.ncrunch*
109 | .*crunch*.local.xml
110 |
111 | # Installshield output folder
112 | [Ee]xpress/
113 |
114 | # DocProject is a documentation generator add-in
115 | DocProject/buildhelp/
116 | DocProject/Help/*.HxT
117 | DocProject/Help/*.HxC
118 | DocProject/Help/*.hhc
119 | DocProject/Help/*.hhk
120 | DocProject/Help/*.hhp
121 | DocProject/Help/Html2
122 | DocProject/Help/html
123 |
124 | # Click-Once directory
125 | publish/
126 |
127 | # Publish Web Output
128 | *.Publish.xml
129 | *.pubxml
130 |
131 | # NuGet Packages Directory
132 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line
133 | #packages/
134 |
135 | # Windows Azure Build Output
136 | csx
137 | *.build.csdef
138 |
139 | # Windows Store app package directory
140 | AppPackages/
141 |
142 | # Others
143 | sql/
144 | *.Cache
145 | ClientBin/
146 | [Ss]tyle[Cc]op.*
147 | ~$*
148 | *~
149 | *.dbmdl
150 | *.[Pp]ublish.xml
151 | *.pfx
152 | *.publishsettings
153 |
154 | # RIA/Silverlight projects
155 | Generated_Code/
156 |
157 | # Backup & report files from converting an old project file to a newer
158 | # Visual Studio version. Backup files are not needed, because we have git ;-)
159 | _UpgradeReport_Files/
160 | Backup*/
161 | UpgradeLog*.XML
162 | UpgradeLog*.htm
163 |
164 | # SQL Server files
165 | App_Data/*.mdf
166 | App_Data/*.ldf
167 |
168 | #############
169 | ## Windows detritus
170 | #############
171 |
172 | # Windows image file caches
173 | Thumbs.db
174 | ehthumbs.db
175 |
176 | # Folder config file
177 | Desktop.ini
178 |
179 | # Recycle Bin used on file shares
180 | $RECYCLE.BIN/
181 |
182 | # Mac crap
183 | .DS_Store
184 |
185 |
186 | #############
187 | ## Python
188 | #############
189 |
190 | *.py[co]
191 |
192 | # Packages
193 | *.egg
194 | *.egg-info
195 | dist/
196 | build/
197 | eggs/
198 | parts/
199 | var/
200 | sdist/
201 | develop-eggs/
202 | .installed.cfg
203 |
204 | # Installer logs
205 | pip-log.txt
206 |
207 | # Unit test / coverage reports
208 | .coverage
209 | .tox
210 |
211 | #Translations
212 | *.mo
213 |
214 | #Mr Developer
215 | .mr.developer.cfg
216 |
--------------------------------------------------------------------------------
/src/configuration.js:
--------------------------------------------------------------------------------
1 |
2 | function defaultConfiguration() {
3 | var cfg = {
4 | glyphs: true,
5 | offset: 0,
6 | inner: false,
7 | glyphFont: "AstGlyphsWF",
8 | textFont: "Arial"
9 | };
10 | return cfg;
11 | }
12 |
13 | window.cjnoyessw.configuration = window.cjnoyessw.configuration || {
14 |
15 | __ckInit: function() {
16 | if (this.__cfg === undefined) {
17 | this.__cfg = defaultConfiguration();
18 | }
19 | },
20 |
21 | getConfiguration: function() {
22 | if (this.__cfg === undefined) {
23 | this.__cfg = defaultConfiguration();
24 | return this.__cfg;
25 | }
26 | else {
27 | return this.__cfg;
28 | }
29 | },
30 |
31 | setConfiguration: function(cfg) {
32 | this.__cfg = cfg;
33 | },
34 |
35 | setGlyphs: function(glyphs) {
36 | this.__ckInit();
37 | this.__cfg.glyphs = glyphs;
38 | },
39 |
40 | getGlyphs: function() {
41 | this.__ckInit();
42 | return this.__cfg.glyphs;
43 | },
44 |
45 | setOffset: function(offset) {
46 | this.__ckInit();
47 | this.__cfg.offset = offset;
48 | },
49 |
50 | getOffset: function() {
51 | this.__ckInit();
52 | return this.__cfg.offset;
53 | },
54 |
55 | setInner: function(inner) {
56 | this.__ckInit();
57 | this.__cfg.inner = inner;
58 | },
59 |
60 | getInner: function() {
61 | this.__ckInit();
62 | return this.__cfg.inner;
63 | }
64 |
65 |
66 | };
67 |
68 | function blueColors() {
69 | var clrs = {
70 | planet:"white",
71 | house: "red",
72 | sign: "green",
73 | ascend: "yellow",
74 | lines: "#808080",
75 | background: ["#000040","#000020"],
76 | circleFill: "#000060",
77 | signCircle: "#000038"
78 | };
79 |
80 | return clrs;
81 | }
82 |
83 | function redColors() {
84 | var clrs = {
85 | planet:"white",
86 | house: "red",
87 | sign: "green",
88 | ascend: "yellow",
89 | lines: "#808080",
90 | background: ["#400000","#200000"],
91 | circleFill: "#600000",
92 | signCircle: "#380000"
93 | };
94 |
95 | return clrs;
96 | }
97 |
98 | function greenColors() {
99 | var clrs = {
100 | planet:"white",
101 | house: "red",
102 | sign: "green",
103 | ascend: "yellow",
104 | lines: "#808080",
105 | background: ["#004000","#002000"],
106 | circleFill: "#006000",
107 | signCircle: "#003800"
108 | };
109 |
110 | return clrs;
111 | }
112 |
113 | function whiteColors() {
114 | var clrs = {
115 | planet:"black",
116 | house: "red",
117 | sign: "green",
118 | ascend: "blue",
119 | lines: "#808080",
120 | background: ["#ffffff","#f0f0f0"],
121 | circleFill: "#99CCFF",
122 | signCircle: "#cceeff"
123 | };
124 |
125 | return clrs;
126 | }
127 |
128 |
129 | function defaultColors() {
130 | return blueColors();
131 | }
132 |
133 |
134 | window.cjnoyessw.colors = window.cjnoyessw.colors || {
135 |
136 | __ckInit: function() {
137 | if (this.__clrs === undefined) {
138 | this.__clrs = defaultColors();
139 | }
140 | },
141 |
142 | setTheme: function (theme) {
143 | var clrs;
144 | switch (theme) {
145 |
146 | case 'white' :
147 | clrs = whiteColors();
148 | break;
149 | case 'red' :
150 | clrs = redColors();
151 | break;
152 | case 'green' :
153 | clrs = greenColors();
154 | break;
155 | case 'blue':
156 | default:
157 | clrs = blueColors();
158 | break;
159 | }
160 | this.__clrs = clrs;
161 | },
162 |
163 | getColors: function () {
164 | if (this.__clrs === undefined) {
165 | this.__clrs = defaultColors();
166 | return this.__clrs;
167 | }
168 | else {
169 | return this.__clrs;
170 | }
171 | },
172 |
173 | setColors: function(clrs) {
174 | this.__clrs = clrs;
175 | }
176 |
177 |
178 |
179 | };
180 |
181 |
182 |
--------------------------------------------------------------------------------
/charts/transits2.json:
--------------------------------------------------------------------------------
1 | {"chartheader":{"strType":"Transits","type":28,"strLongType":"Transits Graphics","version":65247},"data":{"datapoints":[],"other":{"minutes":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"houseproc":"Placidus","housecusps":[-1,0,0,0,0,0,0,0,0,0,0,0],"birthtimeknown":0,"time2":"12:00 AM","time1":"5:35 PM","numgridaspects":0,"gridaspects":[],"date2":"7/4/2013","tropside":"Tropical","name1":"Christopher J. Noyes","name2":"July 4","date1":"3/29/1958"},"numother":0,"transits":[{"minutes":[-1,6141,3440,-6662,7670,5016,5511,-12889,746,-20110,-16813,-13430,-2630,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"numaspect":0,"aspects":[],"maxpt":12,"date":"7/4/2013"},{"minutes":[-1,6198,4152,-6630,7743,5057,5524,-12889,747,-20110,-16812,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"numaspect":0,"aspects":[],"maxpt":10,"date":"7/5/2013"},{"minutes":[-1,6255,4861,-6596,7815,5098,5538,-12889,748,-20109,-16810,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"numaspect":0,"aspects":[],"maxpt":10,"date":"7/6/2013"},{"minutes":[-1,6312,5570,-6560,7888,5139,5552,-12889,748,-20108,-16809,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"numaspect":0,"aspects":[],"maxpt":10,"date":"7/7/2013"},{"minutes":[-1,6370,6281,-6523,7961,5180,5565,-12889,749,-20107,-16807,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"numaspect":0,"aspects":[],"maxpt":10,"date":"7/8/2013"},{"minutes":[-1,6427,6996,-6485,8033,5221,5579,12889,749,-20106,-16806,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"numaspect":0,"aspects":[],"maxpt":10,"date":"7/9/2013"},{"minutes":[-1,6484,7716,-6447,8106,5262,5592,12889,749,-20105,-16804,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"numaspect":0,"aspects":[],"maxpt":10,"date":"7/10/2013"},{"minutes":[-1,6541,8443,-6410,8178,5303,5606,12889,750,-20104,-16803,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"numaspect":0,"aspects":[],"maxpt":10,"date":"7/11/2013"},{"minutes":[-1,6599,9178,-6374,8251,5344,5619,12889,750,-20103,-16801,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"numaspect":0,"aspects":[],"maxpt":10,"date":"7/12/2013"},{"minutes":[-1,6656,9924,-6340,8323,5384,5633,12890,750,-20102,-16800,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"numaspect":0,"aspects":[],"maxpt":10,"date":"7/13/2013"},{"minutes":[-1,6713,10682,-6309,8396,5425,5646,12890,751,-20101,-16798,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"numaspect":0,"aspects":[],"maxpt":10,"date":"7/14/2013"},{"minutes":[-1,6770,11456,-6280,8468,5465,5659,12891,751,-20100,-16797,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"numaspect":0,"aspects":[],"maxpt":10,"date":"7/15/2013"},{"minutes":[-1,6828,12249,-6256,8540,5506,5673,12892,751,-20099,-16796,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"numaspect":0,"aspects":[],"maxpt":10,"date":"7/16/2013"},{"minutes":[-1,6885,13064,-6235,8613,5546,5686,12893,751,-20098,-16794,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"numaspect":0,"aspects":[],"maxpt":10,"date":"7/17/2013"},{"minutes":[-1,6942,13903,-6219,8685,5587,5699,12894,-751,-20096,-16793,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"numaspect":0,"aspects":[],"maxpt":10,"date":"7/18/2013"},{"minutes":[-1,6999,14765,-6208,8757,5627,5713,12895,-751,-20095,-16791,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"numaspect":0,"aspects":[],"maxpt":10,"date":"7/19/2013"},{"minutes":[-1,7057,15651,-6202,8830,5668,5726,12896,-751,-20094,-16790,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"numaspect":0,"aspects":[],"maxpt":10,"date":"7/20/2013"},{"minutes":[-1,7114,16553,-6202,8902,5708,5739,12897,-751,-20093,-16788,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"numaspect":0,"aspects":[],"maxpt":10,"date":"7/21/2013"},{"minutes":[-1,7171,17464,-6207,8974,5748,5752,12898,-750,-20092,-16787,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"numaspect":0,"aspects":[],"maxpt":10,"date":"7/22/2013"},{"minutes":[-1,7228,18374,-6218,9046,5788,5765,12900,-750,-20090,-16786,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"numaspect":0,"aspects":[],"maxpt":10,"date":"7/23/2013"}],"maxpt":15,"strLongType":"Transits Graphics","numcharts":20,"layoutoptions":0,"natal":{"minutes":[10974,523,7021,1644,19367,18556,-12542,15940,-7659,-12844,-9012,-12763,-1963,5605,16405,17472,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"houseproc":"Placidus","housecusps":[-1,0,0,0,0,0,0,0,0,0,0,0],"aspects":[],"birthtimeknown":256,"time2":"12:00 AM","time1":"5:35 PM","numgridaspects":0,"numaspects":0,"gridaspects":[],"date2":"7/4/2013","tropside":"Tropical","name1":"Christopher J. Noyes","name2":"July 4","date1":"3/29/1958"},"strType":"Transits","numdata":0,"numtext":0,"aspectglyphs":0},"fileheader":{"name":"Christopher J. Noyes","filename":"Christopher J. Noyes; Transits.ASGRA","strType":"Transits","type":28,"comment":"Transits","strLongType":"Transits Graphics"}}
2 |
--------------------------------------------------------------------------------
/charts/harmonic.json:
--------------------------------------------------------------------------------
1 | {"chartheader":{"strType":"Harmonic","type":41,"strLongType":"Harmonic Graphics","version":65247},"data":{"datapoints":[],"layoutoptions":0,"numcharts":0,"numother":12,"other":{"minutes":[17960,2080,6276,6564,12656,9412,6968,20560,9036,8176,14448,7852,7852,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"houseproc":"Placidus","housecusps":[0,0,0,0,0,0,0,0,0,0,0,0],"birthtimeknown":0,"time2":"","time1":"3:45 AM","numgridaspects":0,"gridaspects":[],"date2":"4","tropside":"Tropical","name1":"Christopher J. Noyes","name2":"","date1":"3/29/1958"},"maxpt":12,"natal":{"minutes":[9890,520,6969,1641,19364,18553,-12542,15940,-7659,-12844,-9012,-12763,-1963,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"houseproc":"Placidus","housecusps":[9890,11339,13096,15118,17196,19078,20690,539,2296,4318,6396,8278],"aspects":[],"birthtimeknown":0,"time2":"","time1":"3:45 AM","numgridaspects":97,"numaspects":0,"gridaspects":[{"aspect":-1,"second":5,"first":17960},{"aspect":-1,"second":8,"first":2080},{"aspect":-1,"second":10,"first":6276},{"aspect":-1,"second":11,"first":6564},{"aspect":-1,"second":2,"first":12656},{"aspect":-1,"second":12,"first":9412},{"aspect":-1,"second":11,"first":6968},{"aspect":-1,"second":6,"first":20560},{"aspect":-1,"second":12,"first":9036},{"aspect":-1,"second":11,"first":8176},{"aspect":-1,"second":3,"first":14448},{"aspect":-1,"second":11,"first":7852},{"aspect":3,"second":4,"first":1},{"aspect":2,"second":5,"first":1},{"aspect":2,"second":8,"first":1},{"aspect":8,"second":10,"first":1},{"aspect":11,"second":13,"first":1},{"aspect":11,"second":14,"first":1},{"aspect":5,"second":15,"first":1},{"aspect":3,"second":16,"first":1},{"aspect":5,"second":17,"first":1},{"aspect":11,"second":34,"first":1},{"aspect":0,"second":38,"first":1},{"aspect":10,"second":40,"first":1},{"aspect":0,"second":3,"first":2},{"aspect":11,"second":4,"first":2},{"aspect":2,"second":7,"first":2},{"aspect":6,"second":8,"first":2},{"aspect":5,"second":9,"first":2},{"aspect":7,"second":10,"first":2},{"aspect":5,"second":11,"first":2},{"aspect":5,"second":12,"first":2},{"aspect":3,"second":13,"first":2},{"aspect":3,"second":14,"first":2},{"aspect":11,"second":15,"first":2},{"aspect":11,"second":16,"first":2},{"aspect":11,"second":17,"first":2},{"aspect":1,"second":30,"first":2},{"aspect":2,"second":36,"first":2},{"aspect":0,"second":6,"first":3},{"aspect":2,"second":7,"first":3},{"aspect":3,"second":13,"first":3},{"aspect":3,"second":14,"first":3},{"aspect":11,"second":15,"first":3},{"aspect":11,"second":17,"first":3},{"aspect":11,"second":32,"first":3},{"aspect":10,"second":38,"first":3},{"aspect":1,"second":5,"first":4},{"aspect":4,"second":6,"first":4},{"aspect":1,"second":8,"first":4},{"aspect":5,"second":10,"first":4},{"aspect":10,"second":13,"first":4},{"aspect":10,"second":14,"first":4},{"aspect":8,"second":15,"first":4},{"aspect":0,"second":16,"first":4},{"aspect":8,"second":17,"first":4},{"aspect":11,"second":35,"first":4},{"aspect":10,"second":41,"first":4},{"aspect":3,"second":7,"first":5},{"aspect":0,"second":8,"first":5},{"aspect":4,"second":10,"first":5},{"aspect":5,"second":11,"first":5},{"aspect":5,"second":12,"first":5},{"aspect":7,"second":13,"first":5},{"aspect":7,"second":14,"first":5},{"aspect":7,"second":7,"first":6},{"aspect":12,"second":8,"first":6},{"aspect":2,"second":10,"first":6},{"aspect":2,"second":15,"first":6},{"aspect":4,"second":16,"first":6},{"aspect":2,"second":17,"first":6},{"aspect":10,"second":31,"first":6},{"aspect":7,"second":33,"first":6},{"aspect":11,"second":37,"first":6},{"aspect":6,"second":39,"first":6},{"aspect":8,"second":9,"first":7},{"aspect":8,"second":11,"first":7},{"aspect":8,"second":12,"first":7},{"aspect":7,"second":16,"first":7},{"aspect":4,"second":33,"first":7},{"aspect":4,"second":39,"first":7},{"aspect":4,"second":10,"first":8},{"aspect":7,"second":13,"first":8},{"aspect":7,"second":14,"first":8},{"aspect":8,"second":15,"first":8},{"aspect":1,"second":16,"first":8},{"aspect":8,"second":17,"first":8},{"aspect":7,"second":34,"first":8},{"aspect":6,"second":40,"first":8},{"aspect":0,"second":11,"first":9},{"aspect":0,"second":12,"first":9},{"aspect":8,"second":13,"first":9},{"aspect":8,"second":14,"first":9},{"aspect":7,"second":15,"first":9},{"aspect":10,"second":16,"first":9},{"aspect":7,"second":17,"first":9},{"aspect":8,"second":34,"first":9}],"date2":"4","tropside":"Tropical","name1":"Christopher J. Noyes","name2":"","date1":"3/29/1958"},"numdata":0,"strType":"Harmonic","numtext":0,"strLongType":"Harmonic Graphics","aspectglyphs":0},"fileheader":{"name":"Christopher J. Noyes","filename":"Christopher J. Noyes; Harmonic.ASGRA","strType":"Harmonic","type":41,"comment":"Harmonic","strLongType":"Harmonic Graphics"}}
2 |
--------------------------------------------------------------------------------
/charts/relocation.json:
--------------------------------------------------------------------------------
1 | {"chartheader":{"strType":"Relocation","type":33,"strLongType":"Reloction Graphics","version":65247},"data":{"datapoints":[],"layoutoptions":0,"numcharts":0,"numother":0,"other":{"minutes":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"houseproc":"Placidus","housecusps":[0,0,0,0,0,0,0,0,0,0,0,0],"birthtimeknown":0,"time2":"","time1":"5:35 PM","numgridaspects":0,"gridaspects":[],"date2":"","tropside":"Tropical","name1":"Christopher J. Noyes","name2":"","date1":"3/29/1958"},"maxpt":17,"natal":{"minutes":[8524,523,7021,1644,19367,18556,-12542,15940,-7659,-12844,-9012,-12763,-1963,2738,13538,15022,16734,7842,0,0,0,0,0,0,0,0,0,0,0,0],"houseproc":"Placidus","housecusps":[8524,9903,11572,13538,15626,17590,19324,20703,772,2738,4826,6790],"aspects":[],"birthtimeknown":256,"time2":"","time1":"5:35 PM","numgridaspects":99,"numaspects":0,"gridaspects":[{"aspect":11,"second":2,"first":1},{"aspect":6,"second":4,"first":1},{"aspect":1,"second":5,"first":1},{"aspect":2,"second":8,"first":1},{"aspect":8,"second":9,"first":1},{"aspect":12,"second":13,"first":1},{"aspect":9,"second":14,"first":1},{"aspect":2,"second":15,"first":1},{"aspect":4,"second":16,"first":1},{"aspect":2,"second":17,"first":1},{"aspect":9,"second":33,"first":1},{"aspect":11,"second":34,"first":1},{"aspect":0,"second":38,"first":1},{"aspect":12,"second":39,"first":1},{"aspect":10,"second":40,"first":1},{"aspect":4,"second":3,"first":2},{"aspect":8,"second":4,"first":2},{"aspect":4,"second":6,"first":2},{"aspect":8,"second":7,"first":2},{"aspect":10,"second":13,"first":2},{"aspect":11,"second":14,"first":2},{"aspect":7,"second":15,"first":2},{"aspect":11,"second":33,"first":2},{"aspect":9,"second":34,"first":2},{"aspect":10,"second":39,"first":2},{"aspect":12,"second":40,"first":2},{"aspect":0,"second":41,"first":2},{"aspect":1,"second":4,"first":3},{"aspect":3,"second":6,"first":3},{"aspect":2,"second":7,"first":3},{"aspect":3,"second":9,"first":3},{"aspect":2,"second":10,"first":3},{"aspect":0,"second":12,"first":3},{"aspect":7,"second":15,"first":3},{"aspect":11,"second":16,"first":3},{"aspect":11,"second":17,"first":3},{"aspect":2,"second":6,"first":4},{"aspect":1,"second":7,"first":4},{"aspect":11,"second":9,"first":4},{"aspect":11,"second":11,"first":4},{"aspect":10,"second":12,"first":4},{"aspect":10,"second":15,"first":4},{"aspect":6,"second":16,"first":4},{"aspect":3,"second":30,"first":4},{"aspect":5,"second":35,"first":4},{"aspect":0,"second":36,"first":4},{"aspect":8,"second":41,"first":4},{"aspect":6,"second":7,"first":5},{"aspect":3,"second":8,"first":5},{"aspect":4,"second":9,"first":5},{"aspect":1,"second":15,"first":5},{"aspect":5,"second":16,"first":5},{"aspect":3,"second":17,"first":5},{"aspect":9,"second":31,"first":5},{"aspect":12,"second":37,"first":5},{"aspect":1,"second":7,"first":6},{"aspect":0,"second":9,"first":6},{"aspect":1,"second":10,"first":6},{"aspect":0,"second":11,"first":6},{"aspect":3,"second":12,"first":6},{"aspect":6,"second":15,"first":6},{"aspect":10,"second":16,"first":6},{"aspect":2,"second":10,"first":7},{"aspect":7,"second":13,"first":7},{"aspect":6,"second":14,"first":7},{"aspect":7,"second":17,"first":7},{"aspect":10,"second":32,"first":7},{"aspect":0,"second":34,"first":7},{"aspect":11,"second":38,"first":7},{"aspect":4,"second":9,"first":8},{"aspect":4,"second":11,"first":8},{"aspect":4,"second":12,"first":8},{"aspect":2,"second":15,"first":8},{"aspect":8,"second":16,"first":8},{"aspect":0,"second":17,"first":8},{"aspect":1,"second":10,"first":9},{"aspect":0,"second":11,"first":9},{"aspect":3,"second":12,"first":9},{"aspect":12,"second":15,"first":9},{"aspect":1,"second":16,"first":9},{"aspect":10,"second":30,"first":9},{"aspect":11,"second":36,"first":9},{"aspect":1,"second":11,"first":10},{"aspect":2,"second":12,"first":10},{"aspect":11,"second":13,"first":10},{"aspect":10,"second":14,"first":10},{"aspect":12,"second":15,"first":11},{"aspect":9,"second":15,"first":12},{"aspect":4,"second":17,"first":13},{"aspect":2,"second":31,"first":13},{"aspect":1,"second":37,"first":13},{"aspect":4,"second":17,"first":14},{"aspect":1,"second":31,"first":14},{"aspect":2,"second":37,"first":14},{"aspect":5,"second":16,"first":15},{"aspect":2,"second":17,"first":15},{"aspect":11,"second":30,"first":15},{"aspect":10,"second":36,"first":15},{"aspect":8,"second":17,"first":16}],"date2":"","tropside":"Tropical","name1":"Christopher J. Noyes","name2":"","date1":"3/29/1958"},"numdata":0,"strType":"Relocation","numtext":0,"strLongType":"Reloction Graphics","aspectglyphs":0},"fileheader":{"name":"Christopher J. Noyes","filename":"Christopher J. Noyes; Relocation-2.ASGRA","strType":"Relocation","type":33,"comment":"Relocation","strLongType":"Reloction Graphics"}}
2 |
--------------------------------------------------------------------------------
/src/cartwheel.js:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 |
5 |
6 |
7 | var signText = new Array("ARI","TAU","GEM","CAN","LEO","VIR","LIB","SCO","SAG","CAP","AQU","PIS");
8 | var planText = new Array("AS", "SU", "MO", "ME", "VE", "MA", "JU", "SA", "UR",
9 | "NE", "PL", "NN", "SN", "MC", "IC", "PF", "VT", "EP",
10 | "CR", "PA", "JN", "VS", "CN");
11 | var planGlyph = new Array("\xa1","\xa2","\xa3","\xa4","\xa5","\xa6","\xa7","\xa8","\xa9","\xaa","\xab","\xac","\xad","\xae","\xaf","\xb0","\xb1","\xb2","\xb3","\xb4","\xb5","\xb6","\xb7","\xb8","\xb9");
12 | var signGlyph = new Array("\xb8","\xb9","\xba","\xbb","\xbc","\xbd","\xbe","\xbf", "\xc0","\xc1","\xc2","\xc3","\xc4","\xc5","\xc6","\xc7","\xc8");
13 |
14 |
15 | function minToRads(minutes) {
16 | var degrees = minutes / 60.0;
17 | var rads = degrees * (Math.PI / 180.0);
18 | return rads;
19 | }
20 |
21 |
22 | window.cjnoyessw.cartwheel = window.cjnoyessw.cartwheel || {
23 |
24 | getPolarY: function(minutes,radius) {
25 | var rads = minToRads(minutes);
26 | var val = Math.sin(rads) * radius;
27 | return Math.round(val);
28 | },
29 |
30 | getPolarX: function(minutes,radius) {
31 | var rads = minToRads(minutes);
32 | var val = Math.cos(rads) * radius;
33 | return -Math.round(val);
34 | },
35 |
36 | getPlanet: function(index,glyph) {
37 | if (glyph) {
38 | return planGlyph[index];
39 | }
40 | else {
41 | return planText[index];
42 | }
43 | },
44 |
45 | getSign: function(index,glyph) {
46 | if (glyph) {
47 | return signGlyph[index];
48 | }
49 | else {
50 | return signText[index];
51 | }
52 | },
53 |
54 | getAspect: function(index) {
55 | return signGlyph[index+12];
56 | },
57 |
58 | calcCircles: function(height, width) {
59 | var obj = new Object();
60 | obj.orientation = height > width?"portrait":"landscape";
61 | var small = height>width?width:height;
62 | var diff = height>width?height-width:width-height;
63 | obj.outerRadius = Math.floor((small*0.95)/2.0);
64 | obj.offset = Math.floor(diff * .45);
65 | var off = Math.floor((small-obj.outerRadius)/2);
66 | var smallctr = off + (obj.outerRadius/2);
67 | if (obj.orientation=="portrait") {
68 | obj.xPolarOrigin = smallctr;
69 | obj.yPolarOrigin = smallctr +obj.offset;
70 | }
71 | else {
72 | obj.yPolarOrigin = smallctr;
73 | obj.xPolarOrigin = smallctr +obj.offset;
74 | }
75 | obj.signRadius = obj.outerRadius-25;
76 | obj.aspectRadius = Math.floor(obj.outerRadius*.30);
77 | obj.innerRadius = Math.floor(obj.outerRadius*.55);
78 | var diag = (height * height)+(width * width);
79 | var diag = Math.sqrt(diag);
80 | obj.fontScale = 1.60 * (diag/1909.0);
81 | return obj;
82 | },
83 |
84 | getFontSize: function(size) {
85 | size *= this.__circles.fontScale;
86 | size = Math.round(size);
87 | return size + 'px';
88 | },
89 |
90 | getScaledSize: function(size) {
91 | size *= this.__circles.fontScale;
92 | size = Math.round(size);
93 | return size;
94 | },
95 |
96 | getYScaled: function(size) {
97 | return Math.round(this.__scaleY * size);
98 | },
99 |
100 | getXScaled: function(size) {
101 | return Math.round(this.__scaleX * size);
102 | },
103 |
104 |
105 | init: function(selector) {
106 | var canvas = $(selector);
107 | if (canvas.length ==0) {
108 | return false;
109 | }
110 | var context = canvas[0].getContext("2d");
111 | context.scale(1.0,1.0);
112 | this.__context = context;
113 | this.__canvas = canvas;
114 | this.__height = canvas.height();
115 | console.log(this.__height);
116 | this.__width = canvas.width();
117 | console.log(this.__width);
118 | this.__drawables = new Array();
119 | this.__circles=this.calcCircles(this.__height,this.__width);
120 | this.__scaleX = this.__width/1720.0;
121 | this.__scaleY = this.__height/829.0;
122 | return this;
123 | },
124 |
125 | setDimension : function(height, width) {
126 | this.__height = height;
127 | this.__canvas.height(height);
128 | this.__width = width;
129 | this.__canvas.width(width);
130 | this.__circles=this.calcCircles(this.__height,this.__width);
131 | return this;
132 | },
133 |
134 | addDrawable: function(func) {
135 | this.__drawables.push(func);
136 | return this;
137 | },
138 |
139 | addDrawables: function(ary) {
140 | for (var i = 0; i < ary.length; i++) {
141 | this.addDrawable(ary[i]);
142 | }
143 | return this;
144 | },
145 |
146 | context: function() {
147 | return this.__context;
148 | },
149 |
150 | dimensions: function() {
151 | return { height: this.__height,width: this.__width, circles:this.__circles};
152 | },
153 |
154 |
155 |
156 | draw: function(data) {
157 | this.__context.save();
158 | var config = window.cjnoyessw.configuration.getConfiguration();
159 | var colors = window.cjnoyessw.colors.getColors();
160 | for (var i = 0; i < this.__drawables.length; i++) {
161 | var fnc = this.__drawables[i];
162 | fnc(this,data,config,colors);
163 | }
164 | this.__context.restore();
165 | }
166 |
167 | };
168 |
--------------------------------------------------------------------------------
/src/datacalc.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | //const __360DEGREES = 21600;
4 |
5 | var signText = new Array("ARI","TAU","GEM","CAN","LEO","VIR","LIB","SCO","SAG","CAP","AQU","PIS");
6 | var signGlyph = new Array("\xb8","\xb9","\xba","\xbb","\xbc","\xbd","\xbe","\xbf", "\xc0","\xc1","\xc2","\xc3");
7 |
8 | function padLeft0s(str, len) {
9 | var diff = len - str.length;
10 | if (diff <= 0) {
11 | return str;
12 | }
13 | var fill="";
14 | for (var i = 0; i < diff; i++) {
15 | fill += '0';
16 | }
17 | return fill + str;
18 | }
19 |
20 |
21 | function format(degs,min,sign,retrograde,glyph) {
22 | var str = padLeft0s(degs.toString(),2);
23 | if (glyph) {
24 | str+= signGlyph[sign];
25 | }
26 | else {
27 | str+= signText[sign];
28 | }
29 | str += padLeft0s(min.toString(),2);
30 | if (retrograde) {
31 | str += 'R';
32 | }
33 | return str;
34 | }
35 |
36 |
37 |
38 | function calcMidpoints(ary,asc,offset) {
39 | if (ary[0]==0 && ary[1]==0) {
40 | return ary;
41 | }
42 | var retn = new Array();
43 | for (var i = 0; i < ary.length; i++) {
44 | var v1 = ary[i];
45 | v1+=offset;
46 | if (v1 < 0) {
47 | v1 += __360DEGREES;
48 | }
49 | else if (v1 > __360DEGREES) {
50 | v1 -= __360DEGREES;
51 | }
52 | var v2 = 0;
53 | if (i < 11) {
54 | v2 = ary[i+1];
55 | }
56 | else {
57 | v2 = ary[0];
58 | }
59 | if (v2 < v1) {
60 | v2 += __360DEGREES;
61 | }
62 | var diff = (v2-v1)/2;
63 | diff = Math.floor(diff);
64 | v1 += diff;
65 | if (v1 > __360DEGREES) {
66 | v1 -= __360DEGREES;
67 | }
68 | v1 = asc - v1;
69 | if (v1 < 0) {
70 | v1 += __360DEGREES;
71 | }
72 | retn.push(v1);
73 | }
74 | return retn;
75 | }
76 |
77 |
78 | function splitMinutes(minutes,glyph,asc,offset) {
79 | asc += offset;
80 | if (asc < 0) {
81 | asc += __360DEGREES;
82 | }
83 | else if (asc > __360DEGREES) {
84 | asc -= __360DEGREES;
85 | }
86 | var result = new Object();
87 | if (minutes ==-1) {
88 | result.skip = true;
89 | result.formatted = "";
90 | }
91 | else {
92 | result.skip = false;
93 | }
94 | if (minutes < 0) {
95 | result.retrograde=true;
96 | minutes = Math.abs(minutes);
97 | }
98 | else {
99 | result.retrograde=false;
100 | }
101 | if (minutes > __360DEGREES) {
102 | minutes -= __360DEGREES;
103 | }
104 | result.total_minutes = minutes;
105 | result.minutes = minutes % 60;
106 | minutes -= result.minutes;
107 | var degrees = minutes/60;
108 | //console.log(degrees);
109 | result.total_degrees = degrees;
110 | result.degrees = degrees % 30;
111 | degrees -= result.degrees;
112 | result.sign = degrees / 30;
113 | result.formatted = format(result.degrees,result.minutes,result.sign,result.retrograde,glyph);
114 | var min = asc-minutes;
115 | if (min < 0) {
116 | min += __360DEGREES;
117 | }
118 | if (result.skip==true) {
119 | min = -1;
120 | result.formatted='';
121 | }
122 | result.adjustedMin = min;
123 | return result;
124 | }
125 |
126 | function doHouseMidpts(data, glyph, asc, offset) {
127 | data.houseMidpoints = calcMidpoints(data.housecusps, asc, offset);
128 | }
129 |
130 | function natalHouseMidpts(data,glyph, offset, inner) {
131 | var asc = (inner==true?data.other.housecusps[0]:data.natal.housecusps[0]);
132 | doHouseMidpts(data.natal,glyph, asc, offset);
133 | }
134 |
135 | function otherHouseMidpts(data,glyph, offset, inner) {
136 | var asc = (inner==true?data.natal.housecusps[0]:data.other.housecusps[0]);
137 | doHouseMidpts(data.other,glyph, asc, offset);
138 | }
139 |
140 |
141 | function doSplitMinutes(data, glyph, asc, offset) {
142 | if (asc < 0) {
143 | asc += __360DEGREES;
144 | }
145 | else if (asc > __360DEGREES) {
146 | asc -= __360DEGREES;
147 | }
148 | var array = new Array();
149 | for (var i = 0; i < data.minutes.length; i++) {
150 | var min = data.minutes[i];
151 | if (min == 0) {
152 | break;
153 | }
154 | var obj = splitMinutes(min,glyph,asc,offset);
155 | array.push(obj);
156 | }
157 |
158 | data.splitMinutes = array;
159 | }
160 |
161 | function natalSplitMinutes(data,glyph,offset,inner) {
162 | var asc = (inner==true?data.other.housecusps[0]:data.natal.housecusps[0]);
163 | doSplitMinutes(data.natal,glyph,asc,offset);
164 | }
165 |
166 |
167 | function otherSplitMinutes(data,glyph,offset,inner) {
168 | var asc = (inner==true?data.other.housecusps[0]:data.natal.housecusps[0]);
169 | doSplitMinutes(data.other,glyph,asc,offset);
170 | }
171 |
172 |
173 |
174 | function doSplitHouseCusps(data,glyph,asc, offset) {
175 | var array = new Array();
176 | for (var i = 0; i < 12; i++) {
177 | var min = data.housecusps[i];
178 | min += offset;
179 | array.push(splitMinutes(min,glyph,asc,offset));
180 | }
181 | data.splitHousecusps = array;
182 | }
183 |
184 | function natalSplitHouseCusps(data, glyph,offset,inner) {
185 | var asc = (inner==true?data.other.housecusps[0]:data.natal.housecusps[0]);
186 | doSplitHouseCusps(data.natal,glyph,asc,offset);
187 | }
188 |
189 | function otherSplitHouseCusps(data,glyph,offset,inner) {
190 | var asc = (inner==true?data.other.housecusps[0]:data.natal.housecusps[0]);
191 | doSplitHouseCusps(data.other,glyph,asc,offset);
192 | }
193 |
194 | function transitsInit(data,glyph,offset,inner) {
195 | if (data.transits.length == 0) {
196 | return;
197 | }
198 | if (data.chartIndex > data.transits.length-1) {
199 | data.chartIndex = 0;
200 | }
201 | var transit = data.transits[data.chartIndex];
202 | data.other.minutes = transit.minutes;
203 | data.natal.date2 = transit.date;
204 | data.other.gridaspects = transit.aspects;
205 | data.other.maxpt = transit.maxpt;
206 | data.natal.maxpt = data.maxpt;
207 | }
208 |
209 | function init(data,glyph,offset,inner) {
210 | data.natal.maxpt = data.maxpt;
211 | data.other.maxpt = 0;
212 | }
213 |
214 | function biwheelInit(data,glyph,offset,inner) {
215 | data.natal.maxpt = data.maxpt;
216 | data.other.maxpt = data.maxpt;
217 | }
218 |
219 |
220 | window.cjnoyessw.datacalc = window.cjnoyessw.datacalc || {
221 |
222 | process: function(list,data) {
223 | var cfg = window.cjnoyessw.configuration.getConfiguration();
224 | for (var i = 0; i < list.length; i++) {
225 | var fnc = list[i];
226 | fnc(data,cfg.glyphs,cfg.offset,cfg.inner);
227 | }
228 | },
229 |
230 | getList: function(type) {
231 | switch (type) {
232 | case 'Transits' :
233 | return new Array(transitsInit,natalHouseMidpts,natalSplitMinutes,natalSplitHouseCusps,otherHouseMidpts,otherSplitMinutes,otherSplitHouseCusps);
234 | break;
235 | case 'Natal' :
236 | case 'Relocation':
237 | case 'Numeric':
238 | case 'Composite':
239 | return new Array(init,natalHouseMidpts,natalSplitMinutes,natalSplitHouseCusps);
240 | break;
241 | default:
242 | return new Array(biwheelInit,natalHouseMidpts,natalSplitMinutes,natalSplitHouseCusps,otherHouseMidpts,otherSplitMinutes,otherSplitHouseCusps);
243 | break;
244 | }
245 | },
246 |
247 |
248 | };
249 |
250 |
--------------------------------------------------------------------------------
/charts/natal.json:
--------------------------------------------------------------------------------
1 | {"chartheader":{"strType":"Natal","type":26,"strLongType":"Birth Graphics","version":65247},"data":{"datapoints":[{"min":14577,"decan":-1,"house":1},{"min":14577,"decan":-1,"house":1},{"min":1310,"decan":-1,"house":5},{"min":13715,"decan":-1,"house":12},{"min":12806,"decan":-1,"house":12},{"min":16552,"decan":-1,"house":2},{"min":4344,"decan":-1,"house":7},{"min":12956,"decan":-1,"house":12},{"min":285,"decan":-1,"house":5},{"min":19824,"decan":-1,"house":3},{"min":16684,"decan":-1,"house":2},{"min":14133,"decan":-1,"house":12}],"layoutoptions":0,"numcharts":0,"numother":0,"other":{"minutes":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"houseproc":"Equal House","housecusps":[0,0,0,0,0,0,0,0,0,0,0,0],"birthtimeknown":0,"time2":"34N 4","time1":"7:30 PM","numgridaspects":0,"gridaspects":[],"date2":"118W15","tropside":"Tropical","name1":"Football Game","name2":"Los Angeles, California","date1":"11/24/2012"},"maxpt":12,"natal":{"minutes":[14577,14577,1310,-13715,12806,16552,-4344,12956,-285,19824,16684,-14133,-3333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"houseproc":"Equal House","housecusps":[14577,16377,18177,19977,177,1977,3777,5577,7377,9177,10977,12777],"aspects":[{"aspect":2,"second":285,"first":14577},{"aspect":4,"second":19824,"first":50959},{"aspect":0,"second":14133,"first":14577},{"aspect":4,"second":9177,"first":50959},{"aspect":4,"second":19977,"first":50959},{"aspect":4,"second":20042,"first":50959},{"aspect":0,"second":0,"first":14577},{"aspect":1,"second":24900,"first":14577},{"aspect":4,"second":0,"first":50959},{"aspect":2,"second":8303,"first":14577},{"aspect":8,"second":11,"first":14577},{"aspect":3,"second":0,"first":50959},{"aspect":8,"second":0,"first":14577},{"aspect":2,"second":0,"first":14577},{"aspect":4,"second":0,"first":50959},{"aspect":1,"second":0,"first":14577},{"aspect":8,"second":13715,"first":1310},{"aspect":8,"second":14133,"first":1310},{"aspect":6,"second":19977,"first":64226},{"aspect":6,"second":20042,"first":64226},{"aspect":8,"second":4344,"first":13715},{"aspect":0,"second":14133,"first":13715},{"aspect":1,"second":9842,"first":13715},{"aspect":6,"second":0,"first":51821},{"aspect":6,"second":0,"first":51821},{"aspect":1,"second":16552,"first":12806},{"aspect":0,"second":12956,"first":12806},{"aspect":8,"second":285,"first":12806},{"aspect":2,"second":19824,"first":12806},{"aspect":1,"second":16684,"first":12806},{"aspect":1,"second":9177,"first":12806},{"aspect":2,"second":19977,"first":12806},{"aspect":6,"second":9842,"first":52730},{"aspect":2,"second":20042,"first":12806},{"aspect":1,"second":0,"first":12806},{"aspect":4,"second":24900,"first":52730},{"aspect":2,"second":0,"first":12806},{"aspect":8,"second":8303,"first":12806},{"aspect":3,"second":11,"first":52730},{"aspect":8,"second":0,"first":12806},{"aspect":2,"second":0,"first":12806},{"aspect":4,"second":0,"first":52730},{"aspect":1,"second":0,"first":12806},{"aspect":0,"second":0,"first":12806},{"aspect":8,"second":4344,"first":16552},{"aspect":1,"second":12956,"first":16552},{"aspect":4,"second":285,"first":48984},{"aspect":1,"second":19824,"first":16552},{"aspect":0,"second":16684,"first":16552},{"aspect":6,"second":14133,"first":48984},{"aspect":2,"second":9177,"first":16552},{"aspect":1,"second":19977,"first":16552},{"aspect":1,"second":20042,"first":16552},{"aspect":8,"second":12956,"first":4344},{"aspect":8,"second":16684,"first":4344},{"aspect":4,"second":9842,"first":61192},{"aspect":8,"second":285,"first":12956},{"aspect":2,"second":19824,"first":12956},{"aspect":1,"second":16684,"first":12956},{"aspect":1,"second":9177,"first":12956},{"aspect":2,"second":19977,"first":12956},{"aspect":2,"second":20042,"first":12956},{"aspect":4,"second":16684,"first":65251},{"aspect":8,"second":9177,"first":285},{"aspect":4,"second":14133,"first":45712},{"aspect":4,"second":3333,"first":45712},{"aspect":3,"second":9177,"first":45712},{"aspect":0,"second":19977,"first":19824},{"aspect":0,"second":20042,"first":19824},{"aspect":6,"second":14133,"first":48852},{"aspect":1,"second":20042,"first":16684},{"aspect":0,"second":0,"first":16684}],"birthtimeknown":0,"time2":"34N 4","time1":"7:30 PM","numgridaspects":98,"numaspects":72,"gridaspects":[{"aspect":5,"second":4,"first":1},{"aspect":2,"second":8,"first":1},{"aspect":4,"second":9,"first":1},{"aspect":12,"second":10,"first":1},{"aspect":0,"second":11,"first":1},{"aspect":4,"second":13,"first":1},{"aspect":4,"second":14,"first":1},{"aspect":4,"second":17,"first":1},{"aspect":0,"second":30,"first":1},{"aspect":5,"second":31,"first":1},{"aspect":1,"second":32,"first":1},{"aspect":4,"second":33,"first":1},{"aspect":2,"second":34,"first":1},{"aspect":8,"second":35,"first":1},{"aspect":3,"second":36,"first":1},{"aspect":8,"second":37,"first":1},{"aspect":2,"second":38,"first":1},{"aspect":4,"second":39,"first":1},{"aspect":1,"second":40,"first":1},{"aspect":5,"second":41,"first":1},{"aspect":8,"second":3,"first":2},{"aspect":8,"second":11,"first":2},{"aspect":5,"second":12,"first":2},{"aspect":7,"second":13,"first":2},{"aspect":6,"second":14,"first":2},{"aspect":9,"second":16,"first":2},{"aspect":6,"second":17,"first":2},{"aspect":11,"second":31,"first":2},{"aspect":10,"second":37,"first":2},{"aspect":8,"second":6,"first":3},{"aspect":7,"second":8,"first":3},{"aspect":0,"second":11,"first":3},{"aspect":10,"second":13,"first":3},{"aspect":11,"second":14,"first":3},{"aspect":1,"second":16,"first":3},{"aspect":11,"second":17,"first":3},{"aspect":6,"second":31,"first":3},{"aspect":7,"second":34,"first":3},{"aspect":7,"second":37,"first":3},{"aspect":6,"second":40,"first":3},{"aspect":1,"second":5,"first":4},{"aspect":0,"second":7,"first":4},{"aspect":8,"second":8,"first":4},{"aspect":2,"second":9,"first":4},{"aspect":1,"second":10,"first":4},{"aspect":1,"second":13,"first":4},{"aspect":2,"second":14,"first":4},{"aspect":6,"second":16,"first":4},{"aspect":2,"second":17,"first":4},{"aspect":5,"second":30,"first":4},{"aspect":1,"second":31,"first":4},{"aspect":4,"second":32,"first":4},{"aspect":2,"second":33,"first":4},{"aspect":8,"second":34,"first":4},{"aspect":3,"second":35,"first":4},{"aspect":8,"second":36,"first":4},{"aspect":2,"second":37,"first":4},{"aspect":4,"second":38,"first":4},{"aspect":1,"second":39,"first":4},{"aspect":5,"second":40,"first":4},{"aspect":0,"second":41,"first":4},{"aspect":8,"second":6,"first":5},{"aspect":1,"second":7,"first":5},{"aspect":4,"second":8,"first":5},{"aspect":1,"second":9,"first":5},{"aspect":0,"second":10,"first":5},{"aspect":6,"second":11,"first":5},{"aspect":7,"second":12,"first":5},{"aspect":2,"second":13,"first":5},{"aspect":1,"second":14,"first":5},{"aspect":11,"second":16,"first":5},{"aspect":1,"second":17,"first":5},{"aspect":8,"second":7,"first":6},{"aspect":8,"second":10,"first":6},{"aspect":4,"second":16,"first":6},{"aspect":8,"second":8,"first":7},{"aspect":2,"second":9,"first":7},{"aspect":1,"second":10,"first":7},{"aspect":1,"second":13,"first":7},{"aspect":2,"second":14,"first":7},{"aspect":2,"second":17,"first":7},{"aspect":12,"second":9,"first":8},{"aspect":4,"second":10,"first":8},{"aspect":8,"second":13,"first":8},{"aspect":5,"second":14,"first":8},{"aspect":5,"second":17,"first":8},{"aspect":4,"second":11,"first":9},{"aspect":4,"second":12,"first":9},{"aspect":3,"second":13,"first":9},{"aspect":0,"second":14,"first":9},{"aspect":0,"second":17,"first":9},{"aspect":6,"second":11,"first":10},{"aspect":7,"second":12,"first":10},{"aspect":1,"second":17,"first":10},{"aspect":12,"second":30,"first":10},{"aspect":0,"second":31,"first":10},{"aspect":9,"second":36,"first":10},{"aspect":10,"second":16,"first":11}],"date2":"118W15","tropside":"Tropical","name1":"Football Game","name2":"Los Angeles, California","date1":"11/24/2012"},"numdata":12,"strType":"Natal","numtext":0,"strLongType":"Birth Graphics","aspectglyphs":0},"fileheader":{"name":"Football Game","filename":"Football Game; Natal-1.ASGRA","strType":"Natal","type":26,"comment":"Natal","strLongType":"Birth Graphics"}}
2 |
--------------------------------------------------------------------------------
/js/modernizr.min.js:
--------------------------------------------------------------------------------
1 | /* Modernizr 2.6.2 (Custom Build) | MIT & BSD
2 | * Build: http://modernizr.com/download/#-fontface-canvas-canvastext-printshiv-teststyles-load
3 | */
4 | ;window.Modernizr=function(a,b,c){function u(a){i.cssText=a}function v(a,b){return u(prefixes.join(a+";")+(b||""))}function w(a,b){return typeof a===b}function x(a,b){return!!~(""+a).indexOf(b)}function y(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:w(f,"function")?f.bind(d||b):f}return!1}var d="2.6.2",e={},f=b.documentElement,g="modernizr",h=b.createElement(g),i=h.style,j,k={}.toString,l={},m={},n={},o=[],p=o.slice,q,r=function(a,c,d,e){var h,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:g+(d+1),l.appendChild(j);return h=["",'"].join(""),l.id=g,(m?l:n).innerHTML+=h,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=f.style.overflow,f.style.overflow="hidden",f.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),f.style.overflow=k),!!i},s={}.hasOwnProperty,t;!w(s,"undefined")&&!w(s.call,"undefined")?t=function(a,b){return s.call(a,b)}:t=function(a,b){return b in a&&w(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=p.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(p.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(p.call(arguments)))};return e}),l.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},l.canvastext=function(){return!!e.canvas&&!!w(b.createElement("canvas").getContext("2d").fillText,"function")},l.fontface=function(){var a;return r('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a};for(var z in l)t(l,z)&&(q=z.toLowerCase(),e[q]=l[z](),o.push((e[q]?"":"no-")+q));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)t(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof enableClasses!="undefined"&&enableClasses&&(f.className+=" "+(b?"":"no-")+a),e[a]=b}return e},u(""),h=j=null,e._version=d,e.testStyles=r,e}(this,this.document),function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e+~])("+l().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),f="$1"+t+"\\:$2";while(d--)b=c[d]=c[d].split("}"),b[b.length-1]=b[b.length-1].replace(e,f),c[d]=b.join("}");return c.join("{")}function y(a){var b=a.length;while(b--)a[b].removeNode()}function z(a){function g(){clearTimeout(d._removeSheetTimer),b&&b.removeNode(!0),b=null}var b,c,d=m(a),e=a.namespaces,f=a.parentWindow;return!u||a.printShived?a:(typeof e[t]=="undefined"&&e.add(t),f.attachEvent("onbeforeprint",function(){g();var d,e,f,h=a.styleSheets,i=[],j=h.length,l=Array(j);while(j--)l[j]=h[j];while(f=l.pop())if(!f.disabled&&s.test(f.media)){try{d=f.imports,e=d.length}catch(m){e=0}for(j=0;j",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b);var s=/^$|\b(?:all|print)\b/,t="html5shiv",u=!j&&function(){var c=b.documentElement;return typeof b.namespaces!="undefined"&&typeof b.parentWindow!="undefined"&&typeof c.applyElement!="undefined"&&typeof c.removeNode!="undefined"&&typeof a.attachEvent!="undefined"}();r.type+=" print",r.shivPrint=z,z(b)}(this,document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f
2 |
3 |
4 | html5chart
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
202 |
203 |
204 |
205 |
206 |
235 |
236 |
242 |
243 |
Your browser is too old and does not support modern features, Download Google Chrome or Firefox!
244 |
245 |
Select a chart from the List and click Show Chart!
246 |
247 |
248 |
249 |
250 | abcdef
251 |
252 |
253 |
--------------------------------------------------------------------------------
/src/drawables.js:
--------------------------------------------------------------------------------
1 |
2 | //const __360DEGREES = 21600;
3 |
4 |
5 | function minToRads(minutes) {
6 | var degrees = minutes / 60.0;
7 | var rads = degrees * (Math.PI / 180.0);
8 | return rads;
9 | }
10 |
11 | function formatFont(name,size) {
12 | var weight = 'normal';
13 | var style = 'normal';
14 | if (arguments.length==3) {
15 | weight = arguments[2];
16 | }
17 | else if (arguments.length == 4) {
18 | weight = arguments[2];
19 | style = arguments[3];
20 | }
21 | return weight + ' ' + style + ' ' + size + ' ' + name;
22 | }
23 |
24 | function getWheelData(data,config) {
25 | if (config.inner == true) {
26 | return data.other;
27 | }
28 | else {
29 | return data.natal;
30 | }
31 | }
32 |
33 | function getOtherWheelData(data,config) {
34 | if (config.inner == false) {
35 | return data.other;
36 | }
37 | else {
38 | return data.natal;
39 | }
40 | }
41 |
42 | function showAspects(data) {
43 | if (data.natal.numaspects > 0 ) {
44 | return true;
45 | }
46 | else {
47 | return false;
48 | }
49 | }
50 |
51 | // function drawable(wheel,data) {}
52 |
53 | function background(wheel,data,config,colors) {
54 | var dim = wheel.dimensions();
55 | var ctx = wheel.context();
56 | if (colors.background.length==1) {
57 | ctx.fillStyle = colors.background[0];
58 | }
59 | else {
60 | var grad = ctx.createLinearGradient(0,0,dim.height,dim.width);
61 | grad.addColorStop(0,colors.background[0]);
62 | grad.addColorStop(1,colors.background[1]);
63 | ctx.fillStyle = grad;
64 | }
65 |
66 | ctx.fillRect(0,0,dim.width,dim.height);
67 |
68 | }
69 |
70 | function doCircles(wheel,data,config,colors,natal,aspects) {
71 | var dim = wheel.dimensions();
72 | dim = dim.circles;
73 | var ctx = wheel.context();
74 | ctx.fillStyle=colors.circleFill;
75 | var start=0.0;
76 | var end=360.1 * (Math.PI/180.0);
77 | ctx.beginPath();
78 | ctx.arc(dim.xPolarOrigin,dim.yPolarOrigin,dim.outerRadius,start,end,false);
79 | ctx.fill();
80 | ctx.fillStyle=colors.signCircle;
81 | ctx.beginPath();
82 | ctx.arc(dim.xPolarOrigin,dim.yPolarOrigin,dim.signRadius,start,end,false);
83 | ctx.fill();
84 | ctx.lineWidth=2.0;
85 | ctx.strokeStyle=colors.lines;
86 | ctx.beginPath();
87 | ctx.arc(dim.xPolarOrigin,dim.yPolarOrigin,dim.signRadius,start,end,false);
88 | ctx.stroke();
89 | ctx.beginPath();
90 | ctx.arc(dim.xPolarOrigin,dim.yPolarOrigin,dim.outerRadius,start,end,false);
91 | ctx.stroke();
92 | if (natal == true) {
93 | if (aspects==true) {
94 | ctx.beginPath();
95 | ctx.arc(dim.xPolarOrigin,dim.yPolarOrigin,dim.aspectRadius,start,end,false);
96 | ctx.stroke();
97 | }
98 | }
99 | else {
100 | ctx.beginPath();
101 | ctx.arc(dim.xPolarOrigin,dim.yPolarOrigin,dim.innerRadius,start,end,false);
102 | ctx.stroke();
103 | }
104 | }
105 |
106 | function natalCircles(wheel,data,config,colors) {
107 | doCircles(wheel,data,config,colors,true,showAspects(data));
108 | }
109 |
110 | function biwheelCircles(wheel,data,config,colors) {
111 | doCircles(wheel,data,config,colors,false,false);
112 | }
113 |
114 | function doSignLines(wheel,data,config,colors,radius) {
115 | var dim = wheel.dimensions();
116 | dim = dim.circles;
117 | var ctx = wheel.context();
118 | ctx.save();
119 | ctx.lineWidth = 2.0;
120 | ctx.translate(dim.xPolarOrigin,dim.yPolarOrigin);
121 | ctx.strokeStyle=colors.sign;
122 | var angles = new Array();
123 | var thedata = getWheelData(data,config);
124 | var asc = thedata.housecusps[0];
125 | for (var start=0; start < 360; start+=30) {
126 | var ang=start * 60;
127 | ang = asc - ang;
128 | if (ang < 0) {
129 | ang += 360.0;
130 | }
131 | angles.push(ang);
132 | }
133 | for (var i = 0; i < angles.length; i++) {
134 | ctx.beginPath();
135 | ctx.moveTo(wheel.getPolarX(angles[i],radius),wheel.getPolarY(angles[i],radius));
136 | ctx.lineTo(wheel.getPolarX(angles[i],dim.outerRadius),wheel.getPolarY(angles[i],dim.outerRadius));
137 | ctx.stroke();
138 | }
139 | ctx.restore();
140 | }
141 |
142 | function signLines(wheel,data,config,colors) {
143 | var dim = wheel.dimensions();
144 | dim = dim.circles;
145 | var aspects = showAspects(data);
146 | doSignLines(wheel,data,config,colors,aspects==true?dim.aspectRadius:0);
147 | }
148 |
149 | function biwheelSignLines(wheel,data,config,colors) {
150 | doSignLines(wheel,data,config,colors,0);
151 | }
152 |
153 |
154 | function signCircle(wheel, data,config,colors) {
155 | var dim = wheel.dimensions();
156 | dim = dim.circles;
157 | var ctx = wheel.context();
158 | ctx.save();
159 | ctx.translate(dim.xPolarOrigin,dim.yPolarOrigin);
160 | ctx.fillStyle=colors.planet;
161 | var angles = new Array();
162 | var thedata = getWheelData(data,config);
163 | var asc = thedata.housecusps[0];
164 | for (var start=15; start < 375; start+=30) {
165 | var ang=start * 60;
166 | ang = asc - ang;
167 | if (ang < 0) {
168 | ang += 360.0;
169 | }
170 | angles.push(ang);
171 | }
172 | ctx.font=formatFont(config.glyphFont,wheel.getFontSize(14),'400');
173 | ctx.textAlign="center";
174 | ctx.textBaseline="alphabetic";
175 | var rad = dim.signRadius+12;
176 | for (var i = 0; i < angles.length; i++) {
177 | var y = wheel.getPolarY(angles[i],rad);
178 | y+=3;
179 | ctx.fillText(wheel.getSign(i,config.glyphs),wheel.getPolarX(angles[i], rad),y);
180 | }
181 | ctx.restore();
182 | }
183 |
184 | function doHouseLines(wheel,data,config,colors,radius) {
185 | var dim = wheel.dimensions();
186 | dim = dim.circles;
187 | var ctx = wheel.context();
188 | ctx.save();
189 | ctx.lineWidth = 2.0;
190 | ctx.translate(dim.xPolarOrigin,dim.yPolarOrigin);
191 | ctx.strokeStyle=colors.house;
192 | var thedata = getWheelData(data,config);
193 | var angles = thedata.splitHousecusps;
194 | for (var i = 0; i < angles.length; i++) {
195 | if (i==0 || i==6) {
196 | ctx.strokeStyle=colors.ascend;
197 | }
198 | else {
199 | ctx.strokeStyle=colors.house;
200 | }
201 | var ang=angles[i].adjustedMin;
202 | ctx.beginPath();
203 | ctx.moveTo(wheel.getPolarX(ang,radius),wheel.getPolarY(ang,radius));
204 | ctx.lineTo(wheel.getPolarX(ang,dim.signRadius),wheel.getPolarY(ang,dim.signRadius));
205 | ctx.stroke();
206 | }
207 | ctx.restore();
208 | }
209 |
210 | function houseLines(wheel,data,config,colors) {
211 | var dim = wheel.dimensions();
212 | dim = dim.circles;
213 | var aspects = showAspects(data);
214 | doHouseLines(wheel,data,config,colors,aspects==true?dim.aspectRadius:0);
215 | }
216 |
217 | function biwheelHouseLines(wheel,data,config,colors) {
218 | doHouseLines(wheel,data,config,colors,0);
219 | }
220 |
221 | function houseDegrees(wheel,data,config,colors) {
222 | var dim = wheel.dimensions();
223 | dim = dim.circles;
224 | var ctx = wheel.context();
225 | ctx.save();
226 | ctx.fillStyle=colors.house;
227 | ctx.translate(dim.xPolarOrigin,dim.yPolarOrigin);
228 | var thedata = getWheelData(data,config);
229 | var angles = thedata.splitHousecusps;
230 | ctx.font=formatFont(config.glyphFont,wheel.getFontSize(14),'400');
231 | var rad=dim.outerRadius+12;
232 | for (var i = 0; i < 12; i++) {
233 | var x = wheel.getPolarX(angles[i].adjustedMin,rad);
234 | var y = wheel.getPolarY(angles[i].adjustedMin,rad);
235 | if (x < 0) {
236 | ctx.textAlign="right";
237 | }
238 | else {
239 | ctx.textAlign="left";
240 | }
241 | if (y > 0) {
242 | ctx.textBaseline="bottom";
243 | }
244 | else {
245 | ctx.textBaseline="top";
246 | }
247 | ctx.fillText(angles[i].formatted,x,y);
248 | }
249 | ctx.restore();
250 | }
251 |
252 |
253 | function doHouseNumbers(wheel,data,config,colors,rad) {
254 | var dim = wheel.dimensions();
255 | dim = dim.circles;
256 | var ctx = wheel.context();
257 | ctx.save();
258 | ctx.translate(dim.xPolarOrigin,dim.yPolarOrigin);
259 | ctx.strokeStyle=colors.house;
260 | ctx.fillStyle=colors.house;
261 | ctx.font=formatFont(config.textFont,wheel.getFontSize(13));
262 | ctx.textAlign="center";
263 | ctx.textBaseline="alphabetic";
264 | var thedata = getWheelData(data,config);
265 | var ary = thedata.houseMidpoints;
266 |
267 | for (var i =0; i < 12; i++) {
268 | var y = wheel.getPolarY(ary[i],rad);
269 | y+=6;
270 | var num = i+1;
271 | ctx.fillText(num.toString(),wheel.getPolarX(ary[i], rad),y);
272 | }
273 | ctx.restore();
274 | }
275 |
276 | function houseNumbers(wheel,data,config,colors) {
277 | var dim = wheel.dimensions();
278 | dim = dim.circles;
279 | var aspects = showAspects(data);
280 | var rad = aspects==true?(dim.aspectRadius+12):75;
281 | doHouseNumbers(wheel,data,config,colors,rad);
282 | }
283 |
284 | function biwheelHouseNumbers(wheel,data,config,colors) {
285 | var dim = wheel.dimensions();
286 | dim = dim.circles;
287 | doHouseNumbers(wheel,data,config,colors,75);
288 | }
289 |
290 | function doDatalist(wheel,data,config,colors,title,rightoff,natal) {
291 | var ctx = wheel.context();
292 | ctx.save();
293 | var dim = wheel.dimensions();
294 | var incr = wheel.getScaledSize(20);
295 | ctx.translate(dim.width-rightoff,incr);
296 | ctx.font=formatFont(config.textFont,wheel.getFontSize(12));
297 | ctx.fillStyle=colors.lines;
298 | var thedata = natal==true?data.natal:data.other;
299 | var ary = thedata.splitMinutes;
300 | ctx.fillText(title,0,0);
301 | ctx.font=formatFont(config.glyphFont,wheel.getFontSize(16),'400');
302 | var ofs = wheel.getScaledSize(30);
303 | for (var i = 0; i < thedata.maxpt; i++) {
304 | if (thedata.splitMinutes[i].skip==true) {
305 | continue;
306 | }
307 | ctx.fillText(wheel.getPlanet(i,config.glyphs),0,(i+1)*incr);
308 | ctx.fillText(ary[i].formatted,ofs,(i+1)*incr);
309 | }
310 | ctx.restore();
311 |
312 | }
313 |
314 | function datalist(wheel,data,config,colors) {
315 | doDatalist(wheel,data,config,colors,data.natal.name1,wheel.getScaledSize(110),true);
316 | }
317 |
318 | function biwheelDatalist(wheel,data,config,colors) {
319 | doDatalist(wheel,data,config,colors,data.natal.name1,wheel.getScaledSize(220),true);
320 | var title = data.natal.name2;
321 | if (title=='') {
322 | title = data.strType;
323 | }
324 | doDatalist(wheel,data,config,colors,title,wheel.getScaledSize(110),false);
325 | }
326 |
327 | function titles(wheel,data,config,colors) {
328 | var ctx = wheel.context();
329 | ctx.save();
330 | ctx.translate(wheel.getScaledSize(12),wheel.getScaledSize(20));
331 | var thedata = getWheelData(data,config);
332 | ctx.font=formatFont(config.textFont,wheel.getFontSize(14),'bold');
333 | ctx.fillStyle=colors.ascend;
334 | var incr = wheel.getScaledSize(18);
335 | ctx.fillText(data.strType.toUpperCase() + " HOROSCOPE", 0,0);
336 | ctx.fillStyle=colors.house;
337 | ctx.fillText("Name: " + thedata.name1, 0,incr);
338 | ctx.font=formatFont(config.textFont,wheel.getFontSize(13));
339 | ctx.fillStyle=colors.planet;
340 | var y = incr*2;
341 | ctx.fillText("Birth Date: " + thedata.date1, 0,y);
342 | y+= incr;
343 | ctx.fillText("Time: " + thedata.time1, 0,y);
344 | y+= incr;
345 | switch (data.strType) {
346 | case "Natal":
347 | ctx.fillText("Location: " + thedata.name2, 0,y);
348 | y+= incr;
349 | ctx.fillText("Longitude: " + thedata.date2, 0,y);
350 | y+= incr;
351 | ctx.fillText("Latitude: " + thedata.time2, 0,y);
352 | break;
353 | case "Compatability":
354 | case "Composite":
355 | ctx.font=formatFont(config.textFont,wheel.getFontSize(14),'bold');
356 | ctx.fillStyle=colors.house;
357 | ctx.fillText("Name: " + thedata.name2, 0,y);
358 | ctx.fillStyle=colors.planet;
359 | ctx.font=formatFont(config.textFont,wheel.getFontSize(13));
360 | y+= incr;
361 | ctx.fillText("Birth Date: " + thedata.date2, 0,y);
362 | y+= incr;
363 | ctx.fillText("Time: " + thedata.time2, 0,y);
364 | break;
365 | case "Transits":
366 | ctx.fillText("Event: " + thedata.name2, 0,y);
367 | y+= incr;
368 | ctx.fillText("Event Date: " + thedata.date2, 0,y);
369 | y+= incr;
370 | ctx.fillText("Event Time: " + thedata.time2, 0,y);
371 | break;
372 | case "Relocation" :
373 | break;
374 | case "Harmonic" :
375 | ctx.fillText("Harmonic: " + thedata.date2, 0,y);
376 | break;
377 | case "Solar Arc" :
378 | case "Progressed":
379 | ctx.fillText("Offset: " + thedata.date2, 0,y);
380 | break;
381 | }
382 |
383 | y+= incr;
384 | ctx.fillText(thedata.tropside, 0,y);
385 | y+= incr;
386 | ctx.fillText(thedata.houseproc, 0,y);
387 | ctx.restore();
388 | }
389 |
390 | function legend(wheel,data,config,colors) {
391 | var aColors = new Array(colors.sign,colors.house,colors.planet,colors.ascend);
392 | var labels = new Array("Signs/Hard Aspects","Houses","Planets","Ascendant/Soft Aspects");
393 | var dim = wheel.dimensions();
394 | var ctx = wheel.context();
395 | ctx.save();
396 | var incr = wheel.getScaledSize(18);
397 | ctx.translate(10,dim.height-(incr*6));
398 | ctx.font=formatFont(config.textFont,wheel.getFontSize(14),'bold');
399 | ctx.fillStyle=colors.lines;
400 |
401 | var ht=incr;
402 | var y = incr;
403 | ctx.textBaseline="top";
404 | ctx.fillText("Color Key:",0,0);
405 | ctx.font=formatFont(config.textFont,wheel.getFontSize(14));
406 | for ( var i = 0; i < aColors.length; i++, y+= incr) {
407 | ctx.fillStyle= aColors[i];
408 | ctx.fillRect(0,y,incr,incr);
409 | ctx.fillStyle=colors.lines;
410 | ctx.fillText(labels[i],incr+5,y);
411 | }
412 | ctx.restore();
413 | }
414 |
415 |
416 | function doPlotMinutes(wheel,ctx,theradius,data,maxpt,config,colors,diff) {
417 | ctx.textBaseline="top";
418 | ctx.font=formatFont(config.glyphFont,wheel.getFontSize(30));
419 | ctx.fillStyle=colors.planet;
420 | ctx.textAlign="center";
421 | var ary=new Array();
422 | for (var i = 0; i < maxpt; i++) {
423 | ary.push({planet:i, min: data.splitMinutes[i].adjustedMin, pos:0, skip:data.splitMinutes[i].skip });
424 | }
425 | ary.sort(function(a,b) { return a.min-b.min;});
426 | for (var i = 0; i < maxpt; i++) {
427 | if (i > 0 && ary[i].skip==false && (ary[i].min-ary[i-1].min) < diff ) {
428 | ary[i].pos = ary[i-1].pos+1;
429 | }
430 | }
431 |
432 | var radius = theradius - wheel.getScaledSize(25);
433 | ctx.textAlign="center";
434 | ctx.textBaseline="middle";
435 | var step = wheel.getScaledSize(30);
436 | for (var i =0; i < maxpt; i++) {
437 | if (ary[i].skip==true) {
438 | continue;
439 | }
440 | var min = ary[i].min;
441 | //console.log(i);
442 | var rad = radius - (step * ary[i].pos);
443 | //console.log(rad);
444 | var y = wheel.getPolarY(min,rad);
445 | var x = wheel.getPolarX(min, rad);
446 | y-=step;
447 | if (ary[i].planet ==0) {
448 | ctx.fillStyle=colors.ascend;
449 | }
450 | else {
451 | ctx.fillStyle=colors.planet;
452 | }
453 | ctx.fillText(wheel.getPlanet(ary[i].planet,config.glyphs),x,y);
454 | }
455 | }
456 |
457 |
458 | function plotNatalMinutes(wheel,data,config,colors) {
459 | var dim = wheel.dimensions();
460 | dim = dim.circles;
461 | var ctx = wheel.context();
462 | ctx.save();
463 | var thedata = getWheelData(data,config);
464 | ctx.translate(dim.xPolarOrigin,dim.yPolarOrigin);
465 | doPlotMinutes(wheel,ctx,dim.signRadius-wheel.getScaledSize(15),thedata,data.maxpt,config,colors,600);
466 | ctx.restore();
467 | }
468 |
469 | function plotBiwheelMinutes(wheel,data,config,colors) {
470 | var dim = wheel.dimensions();
471 | dim = dim.circles;
472 | var ctx = wheel.context();
473 | ctx.save();
474 | var thedata = getWheelData(data,config);
475 | var other = getOtherWheelData(data,config);
476 | ctx.translate(dim.xPolarOrigin,dim.yPolarOrigin);
477 | doPlotMinutes(wheel,ctx,dim.signRadius-wheel.getScaledSize(15),thedata,data.maxpt,config,colors,600);
478 | doPlotMinutes(wheel,ctx,dim.innerRadius,other,data.maxpt,config,colors,1200);
479 | ctx.restore();
480 | }
481 |
482 | function aspects(wheel,data,config,colors) {
483 | var dim = wheel.dimensions();
484 | dim = dim.circles;
485 | var ctx = wheel.context();
486 | ctx.save();
487 | ctx.lineWidth = 1.0;
488 | var hard = new Array(0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0);
489 | var thedata = getWheelData(data,config);
490 | var pts = thedata.aspects;
491 | var asc = thedata.housecusps[0];
492 | ctx.translate(dim.xPolarOrigin,dim.yPolarOrigin);
493 | var max = 360*60;
494 | for (var i = 0; i < pts.length; i++) {
495 | var aspect = pts[i];
496 | aspect.aspect = hard[aspect.aspect];
497 | if (aspect.aspect ==1) {
498 | ctx.strokeStyle=colors.sign;
499 | }
500 | else {
501 | ctx.strokeStyle=colors.planet;
502 | }
503 | if (aspect.first >= max) {
504 | aspect.first -= max;
505 | }
506 | aspect.first = asc - aspect.first;
507 | if (aspect.first < 0) {
508 | aspect.first += __360DEGREES;
509 | }
510 | aspect.second = asc - aspect.second;
511 | if (aspect.second < 0) {
512 | aspect.second += __360DEGREES;
513 | }
514 | ctx.beginPath();
515 | ctx.moveTo(wheel.getPolarX(aspect.first,dim.aspectRadius),wheel.getPolarY(aspect.first,dim.aspectRadius));
516 | ctx.lineTo(wheel.getPolarX(aspect.second,dim.aspectRadius),wheel.getPolarY(aspect.second,dim.aspectRadius));
517 | ctx.stroke();
518 | }
519 | ctx.restore();
520 | }
521 |
522 |
523 |
524 | window.cjnoyessw.drawables = window.cjnoyessw.drawables || {
525 |
526 | getDrawables: function(type) {
527 | switch (type) {
528 | case 'Natal' :
529 | case 'Relocation':
530 | case 'Numeric':
531 | case 'Composite':
532 | return new Array(background,natalCircles,signLines,houseLines,legend,titles,houseNumbers,aspects,signCircle,datalist,houseDegrees,plotNatalMinutes);
533 | break;
534 | default:
535 | return new Array(background,biwheelCircles,biwheelSignLines,biwheelHouseLines,legend,titles,biwheelHouseNumbers,signCircle,biwheelDatalist,houseDegrees,plotBiwheelMinutes);
536 | break;
537 | }
538 | }
539 |
540 |
541 | };
542 |
543 |
--------------------------------------------------------------------------------
/js/astrow.js:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 |
5 | window.cjnoyessw = window.cjnoyessw || {};
6 |
7 | (function () {
8 |
9 | var __360DEGREES = 21600;
10 |
11 |
12 | function defaultConfiguration() {
13 | var cfg = {
14 | glyphs: true,
15 | offset: 0,
16 | inner: false,
17 | glyphFont: "AstGlyphsWF",
18 | textFont: "Arial"
19 | };
20 | return cfg;
21 | }
22 |
23 | window.cjnoyessw.configuration = window.cjnoyessw.configuration || {
24 |
25 | __ckInit: function() {
26 | if (this.__cfg === undefined) {
27 | this.__cfg = defaultConfiguration();
28 | }
29 | },
30 |
31 | getConfiguration: function() {
32 | if (this.__cfg === undefined) {
33 | this.__cfg = defaultConfiguration();
34 | return this.__cfg;
35 | }
36 | else {
37 | return this.__cfg;
38 | }
39 | },
40 |
41 | setConfiguration: function(cfg) {
42 | this.__cfg = cfg;
43 | },
44 |
45 | setGlyphs: function(glyphs) {
46 | this.__ckInit();
47 | this.__cfg.glyphs = glyphs;
48 | },
49 |
50 | getGlyphs: function() {
51 | this.__ckInit();
52 | return this.__cfg.glyphs;
53 | },
54 |
55 | setOffset: function(offset) {
56 | this.__ckInit();
57 | this.__cfg.offset = offset;
58 | },
59 |
60 | getOffset: function() {
61 | this.__ckInit();
62 | return this.__cfg.offset;
63 | },
64 |
65 | setInner: function(inner) {
66 | this.__ckInit();
67 | this.__cfg.inner = inner;
68 | },
69 |
70 | getInner: function() {
71 | this.__ckInit();
72 | return this.__cfg.inner;
73 | }
74 |
75 |
76 | };
77 |
78 | function blueColors() {
79 | var clrs = {
80 | planet:"white",
81 | house: "red",
82 | sign: "green",
83 | ascend: "yellow",
84 | lines: "#808080",
85 | background: ["#000040","#000020"],
86 | circleFill: "#000060",
87 | signCircle: "#000038"
88 | };
89 |
90 | return clrs;
91 | }
92 |
93 | function redColors() {
94 | var clrs = {
95 | planet:"white",
96 | house: "red",
97 | sign: "green",
98 | ascend: "yellow",
99 | lines: "#808080",
100 | background: ["#400000","#200000"],
101 | circleFill: "#600000",
102 | signCircle: "#380000"
103 | };
104 |
105 | return clrs;
106 | }
107 |
108 | function greenColors() {
109 | var clrs = {
110 | planet:"white",
111 | house: "red",
112 | sign: "green",
113 | ascend: "yellow",
114 | lines: "#808080",
115 | background: ["#004000","#002000"],
116 | circleFill: "#006000",
117 | signCircle: "#003800"
118 | };
119 |
120 | return clrs;
121 | }
122 |
123 | function whiteColors() {
124 | var clrs = {
125 | planet:"black",
126 | house: "red",
127 | sign: "green",
128 | ascend: "blue",
129 | lines: "#808080",
130 | background: ["#ffffff","#f0f0f0"],
131 | circleFill: "#99CCFF",
132 | signCircle: "#cceeff"
133 | };
134 |
135 | return clrs;
136 | }
137 |
138 |
139 | function defaultColors() {
140 | return blueColors();
141 | }
142 |
143 |
144 | window.cjnoyessw.colors = window.cjnoyessw.colors || {
145 |
146 | __ckInit: function() {
147 | if (this.__clrs === undefined) {
148 | this.__clrs = defaultColors();
149 | }
150 | },
151 |
152 | setTheme: function (theme) {
153 | var clrs;
154 | switch (theme) {
155 |
156 | case 'white' :
157 | clrs = whiteColors();
158 | break;
159 | case 'red' :
160 | clrs = redColors();
161 | break;
162 | case 'green' :
163 | clrs = greenColors();
164 | break;
165 | case 'blue':
166 | default:
167 | clrs = blueColors();
168 | break;
169 | }
170 | this.__clrs = clrs;
171 | },
172 |
173 | getColors: function () {
174 | if (this.__clrs === undefined) {
175 | this.__clrs = defaultColors();
176 | return this.__clrs;
177 | }
178 | else {
179 | return this.__clrs;
180 | }
181 | },
182 |
183 | setColors: function(clrs) {
184 | this.__clrs = clrs;
185 | }
186 |
187 |
188 |
189 | };
190 |
191 |
192 |
193 |
194 | //const __360DEGREES = 21600;
195 |
196 | var signText = new Array("ARI","TAU","GEM","CAN","LEO","VIR","LIB","SCO","SAG","CAP","AQU","PIS");
197 | var signGlyph = new Array("\xb8","\xb9","\xba","\xbb","\xbc","\xbd","\xbe","\xbf", "\xc0","\xc1","\xc2","\xc3");
198 |
199 | function padLeft0s(str, len) {
200 | var diff = len - str.length;
201 | if (diff <= 0) {
202 | return str;
203 | }
204 | var fill="";
205 | for (var i = 0; i < diff; i++) {
206 | fill += '0';
207 | }
208 | return fill + str;
209 | }
210 |
211 |
212 | function format(degs,min,sign,retrograde,glyph) {
213 | var str = padLeft0s(degs.toString(),2);
214 | if (glyph) {
215 | str+= signGlyph[sign];
216 | }
217 | else {
218 | str+= signText[sign];
219 | }
220 | str += padLeft0s(min.toString(),2);
221 | if (retrograde) {
222 | str += 'R';
223 | }
224 | return str;
225 | }
226 |
227 |
228 |
229 | function calcMidpoints(ary,asc,offset) {
230 | if (ary[0]==0 && ary[1]==0) {
231 | return ary;
232 | }
233 | var retn = new Array();
234 | for (var i = 0; i < ary.length; i++) {
235 | var v1 = ary[i];
236 | v1+=offset;
237 | if (v1 < 0) {
238 | v1 += __360DEGREES;
239 | }
240 | else if (v1 > __360DEGREES) {
241 | v1 -= __360DEGREES;
242 | }
243 | var v2 = 0;
244 | if (i < 11) {
245 | v2 = ary[i+1];
246 | }
247 | else {
248 | v2 = ary[0];
249 | }
250 | if (v2 < v1) {
251 | v2 += __360DEGREES;
252 | }
253 | var diff = (v2-v1)/2;
254 | diff = Math.floor(diff);
255 | v1 += diff;
256 | if (v1 > __360DEGREES) {
257 | v1 -= __360DEGREES;
258 | }
259 | v1 = asc - v1;
260 | if (v1 < 0) {
261 | v1 += __360DEGREES;
262 | }
263 | retn.push(v1);
264 | }
265 | return retn;
266 | }
267 |
268 |
269 | function splitMinutes(minutes,glyph,asc,offset) {
270 | asc += offset;
271 | if (asc < 0) {
272 | asc += __360DEGREES;
273 | }
274 | else if (asc > __360DEGREES) {
275 | asc -= __360DEGREES;
276 | }
277 | var result = new Object();
278 | if (minutes ==-1) {
279 | result.skip = true;
280 | result.formatted = "";
281 | }
282 | else {
283 | result.skip = false;
284 | }
285 | if (minutes < 0) {
286 | result.retrograde=true;
287 | minutes = Math.abs(minutes);
288 | }
289 | else {
290 | result.retrograde=false;
291 | }
292 | if (minutes > __360DEGREES) {
293 | minutes -= __360DEGREES;
294 | }
295 | result.total_minutes = minutes;
296 | result.minutes = minutes % 60;
297 | minutes -= result.minutes;
298 | var degrees = minutes/60;
299 | //console.log(degrees);
300 | result.total_degrees = degrees;
301 | result.degrees = degrees % 30;
302 | degrees -= result.degrees;
303 | result.sign = degrees / 30;
304 | result.formatted = format(result.degrees,result.minutes,result.sign,result.retrograde,glyph);
305 | var min = asc-minutes;
306 | if (min < 0) {
307 | min += __360DEGREES;
308 | }
309 | if (result.skip==true) {
310 | min = -1;
311 | result.formatted='';
312 | }
313 | result.adjustedMin = min;
314 | return result;
315 | }
316 |
317 | function doHouseMidpts(data, glyph, asc, offset) {
318 | data.houseMidpoints = calcMidpoints(data.housecusps, asc, offset);
319 | }
320 |
321 | function natalHouseMidpts(data,glyph, offset, inner) {
322 | var asc = (inner==true?data.other.housecusps[0]:data.natal.housecusps[0]);
323 | doHouseMidpts(data.natal,glyph, asc, offset);
324 | }
325 |
326 | function otherHouseMidpts(data,glyph, offset, inner) {
327 | var asc = (inner==true?data.natal.housecusps[0]:data.other.housecusps[0]);
328 | doHouseMidpts(data.other,glyph, asc, offset);
329 | }
330 |
331 |
332 | function doSplitMinutes(data, glyph, asc, offset) {
333 | if (asc < 0) {
334 | asc += __360DEGREES;
335 | }
336 | else if (asc > __360DEGREES) {
337 | asc -= __360DEGREES;
338 | }
339 | var array = new Array();
340 | for (var i = 0; i < data.minutes.length; i++) {
341 | var min = data.minutes[i];
342 | if (min == 0) {
343 | break;
344 | }
345 | var obj = splitMinutes(min,glyph,asc,offset);
346 | array.push(obj);
347 | }
348 |
349 | data.splitMinutes = array;
350 | }
351 |
352 | function natalSplitMinutes(data,glyph,offset,inner) {
353 | var asc = (inner==true?data.other.housecusps[0]:data.natal.housecusps[0]);
354 | doSplitMinutes(data.natal,glyph,asc,offset);
355 | }
356 |
357 |
358 | function otherSplitMinutes(data,glyph,offset,inner) {
359 | var asc = (inner==true?data.other.housecusps[0]:data.natal.housecusps[0]);
360 | doSplitMinutes(data.other,glyph,asc,offset);
361 | }
362 |
363 |
364 |
365 | function doSplitHouseCusps(data,glyph,asc, offset) {
366 | var array = new Array();
367 | for (var i = 0; i < 12; i++) {
368 | var min = data.housecusps[i];
369 | min += offset;
370 | array.push(splitMinutes(min,glyph,asc,offset));
371 | }
372 | data.splitHousecusps = array;
373 | }
374 |
375 | function natalSplitHouseCusps(data, glyph,offset,inner) {
376 | var asc = (inner==true?data.other.housecusps[0]:data.natal.housecusps[0]);
377 | doSplitHouseCusps(data.natal,glyph,asc,offset);
378 | }
379 |
380 | function otherSplitHouseCusps(data,glyph,offset,inner) {
381 | var asc = (inner==true?data.other.housecusps[0]:data.natal.housecusps[0]);
382 | doSplitHouseCusps(data.other,glyph,asc,offset);
383 | }
384 |
385 | function transitsInit(data,glyph,offset,inner) {
386 | if (data.transits.length == 0) {
387 | return;
388 | }
389 | if (data.chartIndex > data.transits.length-1) {
390 | data.chartIndex = 0;
391 | }
392 | var transit = data.transits[data.chartIndex];
393 | data.other.minutes = transit.minutes;
394 | data.natal.date2 = transit.date;
395 | data.other.gridaspects = transit.aspects;
396 | data.other.maxpt = transit.maxpt;
397 | data.natal.maxpt = data.maxpt;
398 | }
399 |
400 | function init(data,glyph,offset,inner) {
401 | data.natal.maxpt = data.maxpt;
402 | data.other.maxpt = 0;
403 | }
404 |
405 | function biwheelInit(data,glyph,offset,inner) {
406 | data.natal.maxpt = data.maxpt;
407 | data.other.maxpt = data.maxpt;
408 | }
409 |
410 |
411 | window.cjnoyessw.datacalc = window.cjnoyessw.datacalc || {
412 |
413 | process: function(list,data) {
414 | var cfg = window.cjnoyessw.configuration.getConfiguration();
415 | for (var i = 0; i < list.length; i++) {
416 | var fnc = list[i];
417 | fnc(data,cfg.glyphs,cfg.offset,cfg.inner);
418 | }
419 | },
420 |
421 | getList: function(type) {
422 | switch (type) {
423 | case 'Transits' :
424 | return new Array(transitsInit,natalHouseMidpts,natalSplitMinutes,natalSplitHouseCusps,otherHouseMidpts,otherSplitMinutes,otherSplitHouseCusps);
425 | break;
426 | case 'Natal' :
427 | case 'Relocation':
428 | case 'Numeric':
429 | case 'Composite':
430 | return new Array(init,natalHouseMidpts,natalSplitMinutes,natalSplitHouseCusps);
431 | break;
432 | default:
433 | return new Array(biwheelInit,natalHouseMidpts,natalSplitMinutes,natalSplitHouseCusps,otherHouseMidpts,otherSplitMinutes,otherSplitHouseCusps);
434 | break;
435 | }
436 | },
437 |
438 |
439 | };
440 |
441 |
442 | //const __360DEGREES = 21600;
443 |
444 |
445 | function minToRads(minutes) {
446 | var degrees = minutes / 60.0;
447 | var rads = degrees * (Math.PI / 180.0);
448 | return rads;
449 | }
450 |
451 | function formatFont(name,size) {
452 | var weight = 'normal';
453 | var style = 'normal';
454 | if (arguments.length==3) {
455 | weight = arguments[2];
456 | }
457 | else if (arguments.length == 4) {
458 | weight = arguments[2];
459 | style = arguments[3];
460 | }
461 | return weight + ' ' + style + ' ' + size + ' ' + name;
462 | }
463 |
464 | function getWheelData(data,config) {
465 | if (config.inner == true) {
466 | return data.other;
467 | }
468 | else {
469 | return data.natal;
470 | }
471 | }
472 |
473 | function getOtherWheelData(data,config) {
474 | if (config.inner == false) {
475 | return data.other;
476 | }
477 | else {
478 | return data.natal;
479 | }
480 | }
481 |
482 | function showAspects(data) {
483 | if (data.natal.numaspects > 0 ) {
484 | return true;
485 | }
486 | else {
487 | return false;
488 | }
489 | }
490 |
491 | // function drawable(wheel,data) {}
492 |
493 | function background(wheel,data,config,colors) {
494 | var dim = wheel.dimensions();
495 | var ctx = wheel.context();
496 | if (colors.background.length==1) {
497 | ctx.fillStyle = colors.background[0];
498 | }
499 | else {
500 | var grad = ctx.createLinearGradient(0,0,dim.height,dim.width);
501 | grad.addColorStop(0,colors.background[0]);
502 | grad.addColorStop(1,colors.background[1]);
503 | ctx.fillStyle = grad;
504 | }
505 |
506 | ctx.fillRect(0,0,dim.width,dim.height);
507 |
508 | }
509 |
510 | function doCircles(wheel,data,config,colors,natal,aspects) {
511 | var dim = wheel.dimensions();
512 | dim = dim.circles;
513 | var ctx = wheel.context();
514 | ctx.fillStyle=colors.circleFill;
515 | var start=0.0;
516 | var end=360.1 * (Math.PI/180.0);
517 | ctx.beginPath();
518 | ctx.arc(dim.xPolarOrigin,dim.yPolarOrigin,dim.outerRadius,start,end,false);
519 | ctx.fill();
520 | ctx.fillStyle=colors.signCircle;
521 | ctx.beginPath();
522 | ctx.arc(dim.xPolarOrigin,dim.yPolarOrigin,dim.signRadius,start,end,false);
523 | ctx.fill();
524 | ctx.lineWidth=2.0;
525 | ctx.strokeStyle=colors.lines;
526 | ctx.beginPath();
527 | ctx.arc(dim.xPolarOrigin,dim.yPolarOrigin,dim.signRadius,start,end,false);
528 | ctx.stroke();
529 | ctx.beginPath();
530 | ctx.arc(dim.xPolarOrigin,dim.yPolarOrigin,dim.outerRadius,start,end,false);
531 | ctx.stroke();
532 | if (natal == true) {
533 | if (aspects==true) {
534 | ctx.beginPath();
535 | ctx.arc(dim.xPolarOrigin,dim.yPolarOrigin,dim.aspectRadius,start,end,false);
536 | ctx.stroke();
537 | }
538 | }
539 | else {
540 | ctx.beginPath();
541 | ctx.arc(dim.xPolarOrigin,dim.yPolarOrigin,dim.innerRadius,start,end,false);
542 | ctx.stroke();
543 | }
544 | }
545 |
546 | function natalCircles(wheel,data,config,colors) {
547 | doCircles(wheel,data,config,colors,true,showAspects(data));
548 | }
549 |
550 | function biwheelCircles(wheel,data,config,colors) {
551 | doCircles(wheel,data,config,colors,false,false);
552 | }
553 |
554 | function doSignLines(wheel,data,config,colors,radius) {
555 | var dim = wheel.dimensions();
556 | dim = dim.circles;
557 | var ctx = wheel.context();
558 | ctx.save();
559 | ctx.lineWidth = 2.0;
560 | ctx.translate(dim.xPolarOrigin,dim.yPolarOrigin);
561 | ctx.strokeStyle=colors.sign;
562 | var angles = new Array();
563 | var thedata = getWheelData(data,config);
564 | var asc = thedata.housecusps[0];
565 | for (var start=0; start < 360; start+=30) {
566 | var ang=start * 60;
567 | ang = asc - ang;
568 | if (ang < 0) {
569 | ang += 360.0;
570 | }
571 | angles.push(ang);
572 | }
573 | for (var i = 0; i < angles.length; i++) {
574 | ctx.beginPath();
575 | ctx.moveTo(wheel.getPolarX(angles[i],radius),wheel.getPolarY(angles[i],radius));
576 | ctx.lineTo(wheel.getPolarX(angles[i],dim.outerRadius),wheel.getPolarY(angles[i],dim.outerRadius));
577 | ctx.stroke();
578 | }
579 | ctx.restore();
580 | }
581 |
582 | function signLines(wheel,data,config,colors) {
583 | var dim = wheel.dimensions();
584 | dim = dim.circles;
585 | var aspects = showAspects(data);
586 | doSignLines(wheel,data,config,colors,aspects==true?dim.aspectRadius:0);
587 | }
588 |
589 | function biwheelSignLines(wheel,data,config,colors) {
590 | doSignLines(wheel,data,config,colors,0);
591 | }
592 |
593 |
594 | function signCircle(wheel, data,config,colors) {
595 | var dim = wheel.dimensions();
596 | dim = dim.circles;
597 | var ctx = wheel.context();
598 | ctx.save();
599 | ctx.translate(dim.xPolarOrigin,dim.yPolarOrigin);
600 | ctx.fillStyle=colors.planet;
601 | var angles = new Array();
602 | var thedata = getWheelData(data,config);
603 | var asc = thedata.housecusps[0];
604 | for (var start=15; start < 375; start+=30) {
605 | var ang=start * 60;
606 | ang = asc - ang;
607 | if (ang < 0) {
608 | ang += 360.0;
609 | }
610 | angles.push(ang);
611 | }
612 | ctx.font=formatFont(config.glyphFont,wheel.getFontSize(14),'400');
613 | ctx.textAlign="center";
614 | ctx.textBaseline="alphabetic";
615 | var rad = dim.signRadius+12;
616 | for (var i = 0; i < angles.length; i++) {
617 | var y = wheel.getPolarY(angles[i],rad);
618 | y+=3;
619 | ctx.fillText(wheel.getSign(i,config.glyphs),wheel.getPolarX(angles[i], rad),y);
620 | }
621 | ctx.restore();
622 | }
623 |
624 | function doHouseLines(wheel,data,config,colors,radius) {
625 | var dim = wheel.dimensions();
626 | dim = dim.circles;
627 | var ctx = wheel.context();
628 | ctx.save();
629 | ctx.lineWidth = 2.0;
630 | ctx.translate(dim.xPolarOrigin,dim.yPolarOrigin);
631 | ctx.strokeStyle=colors.house;
632 | var thedata = getWheelData(data,config);
633 | var angles = thedata.splitHousecusps;
634 | for (var i = 0; i < angles.length; i++) {
635 | if (i==0 || i==6) {
636 | ctx.strokeStyle=colors.ascend;
637 | }
638 | else {
639 | ctx.strokeStyle=colors.house;
640 | }
641 | var ang=angles[i].adjustedMin;
642 | ctx.beginPath();
643 | ctx.moveTo(wheel.getPolarX(ang,radius),wheel.getPolarY(ang,radius));
644 | ctx.lineTo(wheel.getPolarX(ang,dim.signRadius),wheel.getPolarY(ang,dim.signRadius));
645 | ctx.stroke();
646 | }
647 | ctx.restore();
648 | }
649 |
650 | function houseLines(wheel,data,config,colors) {
651 | var dim = wheel.dimensions();
652 | dim = dim.circles;
653 | var aspects = showAspects(data);
654 | doHouseLines(wheel,data,config,colors,aspects==true?dim.aspectRadius:0);
655 | }
656 |
657 | function biwheelHouseLines(wheel,data,config,colors) {
658 | doHouseLines(wheel,data,config,colors,0);
659 | }
660 |
661 | function houseDegrees(wheel,data,config,colors) {
662 | var dim = wheel.dimensions();
663 | dim = dim.circles;
664 | var ctx = wheel.context();
665 | ctx.save();
666 | ctx.fillStyle=colors.house;
667 | ctx.translate(dim.xPolarOrigin,dim.yPolarOrigin);
668 | var thedata = getWheelData(data,config);
669 | var angles = thedata.splitHousecusps;
670 | ctx.font=formatFont(config.glyphFont,wheel.getFontSize(14),'400');
671 | var rad=dim.outerRadius+12;
672 | for (var i = 0; i < 12; i++) {
673 | var x = wheel.getPolarX(angles[i].adjustedMin,rad);
674 | var y = wheel.getPolarY(angles[i].adjustedMin,rad);
675 | if (x < 0) {
676 | ctx.textAlign="right";
677 | }
678 | else {
679 | ctx.textAlign="left";
680 | }
681 | if (y > 0) {
682 | ctx.textBaseline="bottom";
683 | }
684 | else {
685 | ctx.textBaseline="top";
686 | }
687 | ctx.fillText(angles[i].formatted,x,y);
688 | }
689 | ctx.restore();
690 | }
691 |
692 |
693 | function doHouseNumbers(wheel,data,config,colors,rad) {
694 | var dim = wheel.dimensions();
695 | dim = dim.circles;
696 | var ctx = wheel.context();
697 | ctx.save();
698 | ctx.translate(dim.xPolarOrigin,dim.yPolarOrigin);
699 | ctx.strokeStyle=colors.house;
700 | ctx.fillStyle=colors.house;
701 | ctx.font=formatFont(config.textFont,wheel.getFontSize(13));
702 | ctx.textAlign="center";
703 | ctx.textBaseline="alphabetic";
704 | var thedata = getWheelData(data,config);
705 | var ary = thedata.houseMidpoints;
706 |
707 | for (var i =0; i < 12; i++) {
708 | var y = wheel.getPolarY(ary[i],rad);
709 | y+=6;
710 | var num = i+1;
711 | ctx.fillText(num.toString(),wheel.getPolarX(ary[i], rad),y);
712 | }
713 | ctx.restore();
714 | }
715 |
716 | function houseNumbers(wheel,data,config,colors) {
717 | var dim = wheel.dimensions();
718 | dim = dim.circles;
719 | var aspects = showAspects(data);
720 | var rad = aspects==true?(dim.aspectRadius+12):75;
721 | doHouseNumbers(wheel,data,config,colors,rad);
722 | }
723 |
724 | function biwheelHouseNumbers(wheel,data,config,colors) {
725 | var dim = wheel.dimensions();
726 | dim = dim.circles;
727 | doHouseNumbers(wheel,data,config,colors,75);
728 | }
729 |
730 | function doDatalist(wheel,data,config,colors,title,rightoff,natal) {
731 | var ctx = wheel.context();
732 | ctx.save();
733 | var dim = wheel.dimensions();
734 | var incr = wheel.getScaledSize(20);
735 | ctx.translate(dim.width-rightoff,incr);
736 | ctx.font=formatFont(config.textFont,wheel.getFontSize(12));
737 | ctx.fillStyle=colors.lines;
738 | var thedata = natal==true?data.natal:data.other;
739 | var ary = thedata.splitMinutes;
740 | ctx.fillText(title,0,0);
741 | ctx.font=formatFont(config.glyphFont,wheel.getFontSize(16),'400');
742 | var ofs = wheel.getScaledSize(30);
743 | for (var i = 0; i < thedata.maxpt; i++) {
744 | if (thedata.splitMinutes[i].skip==true) {
745 | continue;
746 | }
747 | ctx.fillText(wheel.getPlanet(i,config.glyphs),0,(i+1)*incr);
748 | ctx.fillText(ary[i].formatted,ofs,(i+1)*incr);
749 | }
750 | ctx.restore();
751 |
752 | }
753 |
754 | function datalist(wheel,data,config,colors) {
755 | doDatalist(wheel,data,config,colors,data.natal.name1,wheel.getScaledSize(110),true);
756 | }
757 |
758 | function biwheelDatalist(wheel,data,config,colors) {
759 | doDatalist(wheel,data,config,colors,data.natal.name1,wheel.getScaledSize(220),true);
760 | var title = data.natal.name2;
761 | if (title=='') {
762 | title = data.strType;
763 | }
764 | doDatalist(wheel,data,config,colors,title,wheel.getScaledSize(110),false);
765 | }
766 |
767 | function titles(wheel,data,config,colors) {
768 | var ctx = wheel.context();
769 | ctx.save();
770 | ctx.translate(wheel.getScaledSize(12),wheel.getScaledSize(20));
771 | var thedata = getWheelData(data,config);
772 | ctx.font=formatFont(config.textFont,wheel.getFontSize(14),'bold');
773 | ctx.fillStyle=colors.ascend;
774 | var incr = wheel.getScaledSize(18);
775 | ctx.fillText(data.strType.toUpperCase() + " HOROSCOPE", 0,0);
776 | ctx.fillStyle=colors.house;
777 | ctx.fillText("Name: " + thedata.name1, 0,incr);
778 | ctx.font=formatFont(config.textFont,wheel.getFontSize(13));
779 | ctx.fillStyle=colors.planet;
780 | var y = incr*2;
781 | ctx.fillText("Birth Date: " + thedata.date1, 0,y);
782 | y+= incr;
783 | ctx.fillText("Time: " + thedata.time1, 0,y);
784 | y+= incr;
785 | switch (data.strType) {
786 | case "Natal":
787 | ctx.fillText("Location: " + thedata.name2, 0,y);
788 | y+= incr;
789 | ctx.fillText("Longitude: " + thedata.date2, 0,y);
790 | y+= incr;
791 | ctx.fillText("Latitude: " + thedata.time2, 0,y);
792 | break;
793 | case "Compatability":
794 | case "Composite":
795 | ctx.font=formatFont(config.textFont,wheel.getFontSize(14),'bold');
796 | ctx.fillStyle=colors.house;
797 | ctx.fillText("Name: " + thedata.name2, 0,y);
798 | ctx.fillStyle=colors.planet;
799 | ctx.font=formatFont(config.textFont,wheel.getFontSize(13));
800 | y+= incr;
801 | ctx.fillText("Birth Date: " + thedata.date2, 0,y);
802 | y+= incr;
803 | ctx.fillText("Time: " + thedata.time2, 0,y);
804 | break;
805 | case "Transits":
806 | ctx.fillText("Event: " + thedata.name2, 0,y);
807 | y+= incr;
808 | ctx.fillText("Event Date: " + thedata.date2, 0,y);
809 | y+= incr;
810 | ctx.fillText("Event Time: " + thedata.time2, 0,y);
811 | break;
812 | case "Relocation" :
813 | break;
814 | case "Harmonic" :
815 | ctx.fillText("Harmonic: " + thedata.date2, 0,y);
816 | break;
817 | case "Solar Arc" :
818 | case "Progressed":
819 | ctx.fillText("Offset: " + thedata.date2, 0,y);
820 | break;
821 | }
822 |
823 | y+= incr;
824 | ctx.fillText(thedata.tropside, 0,y);
825 | y+= incr;
826 | ctx.fillText(thedata.houseproc, 0,y);
827 | ctx.restore();
828 | }
829 |
830 | function legend(wheel,data,config,colors) {
831 | var aColors = new Array(colors.sign,colors.house,colors.planet,colors.ascend);
832 | var labels = new Array("Signs/Hard Aspects","Houses","Planets","Ascendant/Soft Aspects");
833 | var dim = wheel.dimensions();
834 | var ctx = wheel.context();
835 | ctx.save();
836 | var incr = wheel.getScaledSize(18);
837 | ctx.translate(10,dim.height-(incr*6));
838 | ctx.font=formatFont(config.textFont,wheel.getFontSize(14),'bold');
839 | ctx.fillStyle=colors.lines;
840 |
841 | var ht=incr;
842 | var y = incr;
843 | ctx.textBaseline="top";
844 | ctx.fillText("Color Key:",0,0);
845 | ctx.font=formatFont(config.textFont,wheel.getFontSize(14));
846 | for ( var i = 0; i < aColors.length; i++, y+= incr) {
847 | ctx.fillStyle= aColors[i];
848 | ctx.fillRect(0,y,incr,incr);
849 | ctx.fillStyle=colors.lines;
850 | ctx.fillText(labels[i],incr+5,y);
851 | }
852 | ctx.restore();
853 | }
854 |
855 |
856 | function doPlotMinutes(wheel,ctx,theradius,data,maxpt,config,colors,diff) {
857 | ctx.textBaseline="top";
858 | ctx.font=formatFont(config.glyphFont,wheel.getFontSize(30));
859 | ctx.fillStyle=colors.planet;
860 | ctx.textAlign="center";
861 | var ary=new Array();
862 | for (var i = 0; i < maxpt; i++) {
863 | ary.push({planet:i, min: data.splitMinutes[i].adjustedMin, pos:0, skip:data.splitMinutes[i].skip });
864 | }
865 | ary.sort(function(a,b) { return a.min-b.min;});
866 | for (var i = 0; i < maxpt; i++) {
867 | if (i > 0 && ary[i].skip==false && (ary[i].min-ary[i-1].min) < diff ) {
868 | ary[i].pos = ary[i-1].pos+1;
869 | }
870 | }
871 |
872 | var radius = theradius - wheel.getScaledSize(25);
873 | ctx.textAlign="center";
874 | ctx.textBaseline="middle";
875 | var step = wheel.getScaledSize(30);
876 | for (var i =0; i < maxpt; i++) {
877 | if (ary[i].skip==true) {
878 | continue;
879 | }
880 | var min = ary[i].min;
881 | //console.log(i);
882 | var rad = radius - (step * ary[i].pos);
883 | //console.log(rad);
884 | var y = wheel.getPolarY(min,rad);
885 | var x = wheel.getPolarX(min, rad);
886 | y-=step;
887 | if (ary[i].planet ==0) {
888 | ctx.fillStyle=colors.ascend;
889 | }
890 | else {
891 | ctx.fillStyle=colors.planet;
892 | }
893 | ctx.fillText(wheel.getPlanet(ary[i].planet,config.glyphs),x,y);
894 | }
895 | }
896 |
897 |
898 | function plotNatalMinutes(wheel,data,config,colors) {
899 | var dim = wheel.dimensions();
900 | dim = dim.circles;
901 | var ctx = wheel.context();
902 | ctx.save();
903 | var thedata = getWheelData(data,config);
904 | ctx.translate(dim.xPolarOrigin,dim.yPolarOrigin);
905 | doPlotMinutes(wheel,ctx,dim.signRadius-wheel.getScaledSize(15),thedata,data.maxpt,config,colors,600);
906 | ctx.restore();
907 | }
908 |
909 | function plotBiwheelMinutes(wheel,data,config,colors) {
910 | var dim = wheel.dimensions();
911 | dim = dim.circles;
912 | var ctx = wheel.context();
913 | ctx.save();
914 | var thedata = getWheelData(data,config);
915 | var other = getOtherWheelData(data,config);
916 | ctx.translate(dim.xPolarOrigin,dim.yPolarOrigin);
917 | doPlotMinutes(wheel,ctx,dim.signRadius-wheel.getScaledSize(15),thedata,data.maxpt,config,colors,600);
918 | doPlotMinutes(wheel,ctx,dim.innerRadius,other,data.maxpt,config,colors,1200);
919 | ctx.restore();
920 | }
921 |
922 | function aspects(wheel,data,config,colors) {
923 | var dim = wheel.dimensions();
924 | dim = dim.circles;
925 | var ctx = wheel.context();
926 | ctx.save();
927 | ctx.lineWidth = 1.0;
928 | var hard = new Array(0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0);
929 | var thedata = getWheelData(data,config);
930 | var pts = thedata.aspects;
931 | var asc = thedata.housecusps[0];
932 | ctx.translate(dim.xPolarOrigin,dim.yPolarOrigin);
933 | var max = 360*60;
934 | for (var i = 0; i < pts.length; i++) {
935 | var aspect = pts[i];
936 | aspect.aspect = hard[aspect.aspect];
937 | if (aspect.aspect ==1) {
938 | ctx.strokeStyle=colors.sign;
939 | }
940 | else {
941 | ctx.strokeStyle=colors.planet;
942 | }
943 | if (aspect.first >= max) {
944 | aspect.first -= max;
945 | }
946 | aspect.first = asc - aspect.first;
947 | if (aspect.first < 0) {
948 | aspect.first += __360DEGREES;
949 | }
950 | aspect.second = asc - aspect.second;
951 | if (aspect.second < 0) {
952 | aspect.second += __360DEGREES;
953 | }
954 | ctx.beginPath();
955 | ctx.moveTo(wheel.getPolarX(aspect.first,dim.aspectRadius),wheel.getPolarY(aspect.first,dim.aspectRadius));
956 | ctx.lineTo(wheel.getPolarX(aspect.second,dim.aspectRadius),wheel.getPolarY(aspect.second,dim.aspectRadius));
957 | ctx.stroke();
958 | }
959 | ctx.restore();
960 | }
961 |
962 |
963 |
964 | window.cjnoyessw.drawables = window.cjnoyessw.drawables || {
965 |
966 | getDrawables: function(type) {
967 | switch (type) {
968 | case 'Natal' :
969 | case 'Relocation':
970 | case 'Numeric':
971 | case 'Composite':
972 | return new Array(background,natalCircles,signLines,houseLines,legend,titles,houseNumbers,aspects,signCircle,datalist,houseDegrees,plotNatalMinutes);
973 | break;
974 | default:
975 | return new Array(background,biwheelCircles,biwheelSignLines,biwheelHouseLines,legend,titles,biwheelHouseNumbers,signCircle,biwheelDatalist,houseDegrees,plotBiwheelMinutes);
976 | break;
977 | }
978 | }
979 |
980 |
981 | };
982 |
983 | /**
984 | *
985 | */
986 |
987 |
988 |
989 | var signText = new Array("ARI","TAU","GEM","CAN","LEO","VIR","LIB","SCO","SAG","CAP","AQU","PIS");
990 | var planText = new Array("AS", "SU", "MO", "ME", "VE", "MA", "JU", "SA", "UR",
991 | "NE", "PL", "NN", "SN", "MC", "IC", "PF", "VT", "EP",
992 | "CR", "PA", "JN", "VS", "CN");
993 | var planGlyph = new Array("\xa1","\xa2","\xa3","\xa4","\xa5","\xa6","\xa7","\xa8","\xa9","\xaa","\xab","\xac","\xad","\xae","\xaf","\xb0","\xb1","\xb2","\xb3","\xb4","\xb5","\xb6","\xb7","\xb8","\xb9");
994 | var signGlyph = new Array("\xb8","\xb9","\xba","\xbb","\xbc","\xbd","\xbe","\xbf", "\xc0","\xc1","\xc2","\xc3","\xc4","\xc5","\xc6","\xc7","\xc8");
995 |
996 |
997 | function minToRads(minutes) {
998 | var degrees = minutes / 60.0;
999 | var rads = degrees * (Math.PI / 180.0);
1000 | return rads;
1001 | }
1002 |
1003 |
1004 | window.cjnoyessw.cartwheel = window.cjnoyessw.cartwheel || {
1005 |
1006 | getPolarY: function(minutes,radius) {
1007 | var rads = minToRads(minutes);
1008 | var val = Math.sin(rads) * radius;
1009 | return Math.round(val);
1010 | },
1011 |
1012 | getPolarX: function(minutes,radius) {
1013 | var rads = minToRads(minutes);
1014 | var val = Math.cos(rads) * radius;
1015 | return -Math.round(val);
1016 | },
1017 |
1018 | getPlanet: function(index,glyph) {
1019 | if (glyph) {
1020 | return planGlyph[index];
1021 | }
1022 | else {
1023 | return planText[index];
1024 | }
1025 | },
1026 |
1027 | getSign: function(index,glyph) {
1028 | if (glyph) {
1029 | return signGlyph[index];
1030 | }
1031 | else {
1032 | return signText[index];
1033 | }
1034 | },
1035 |
1036 | getAspect: function(index) {
1037 | return signGlyph[index+12];
1038 | },
1039 |
1040 | calcCircles: function(height, width) {
1041 | var obj = new Object();
1042 | obj.orientation = height > width?"portrait":"landscape";
1043 | var small = height>width?width:height;
1044 | var diff = height>width?height-width:width-height;
1045 | obj.outerRadius = Math.floor((small*0.95)/2.0);
1046 | obj.offset = Math.floor(diff * .45);
1047 | var off = Math.floor((small-obj.outerRadius)/2);
1048 | var smallctr = off + (obj.outerRadius/2);
1049 | if (obj.orientation=="portrait") {
1050 | obj.xPolarOrigin = smallctr;
1051 | obj.yPolarOrigin = smallctr +obj.offset;
1052 | }
1053 | else {
1054 | obj.yPolarOrigin = smallctr;
1055 | obj.xPolarOrigin = smallctr +obj.offset;
1056 | }
1057 | obj.signRadius = obj.outerRadius-25;
1058 | obj.aspectRadius = Math.floor(obj.outerRadius*.30);
1059 | obj.innerRadius = Math.floor(obj.outerRadius*.55);
1060 | var diag = (height * height)+(width * width);
1061 | var diag = Math.sqrt(diag);
1062 | obj.fontScale = 1.60 * (diag/1909.0);
1063 | return obj;
1064 | },
1065 |
1066 | getFontSize: function(size) {
1067 | size *= this.__circles.fontScale;
1068 | size = Math.round(size);
1069 | return size + 'px';
1070 | },
1071 |
1072 | getScaledSize: function(size) {
1073 | size *= this.__circles.fontScale;
1074 | size = Math.round(size);
1075 | return size;
1076 | },
1077 |
1078 | getYScaled: function(size) {
1079 | return Math.round(this.__scaleY * size);
1080 | },
1081 |
1082 | getXScaled: function(size) {
1083 | return Math.round(this.__scaleX * size);
1084 | },
1085 |
1086 |
1087 | init: function(selector) {
1088 | var canvas = $(selector);
1089 | if (canvas.length ==0) {
1090 | return false;
1091 | }
1092 | var context = canvas[0].getContext("2d");
1093 | context.scale(1.0,1.0);
1094 | this.__context = context;
1095 | this.__canvas = canvas;
1096 | this.__height = canvas.height();
1097 | console.log(this.__height);
1098 | this.__width = canvas.width();
1099 | console.log(this.__width);
1100 | this.__drawables = new Array();
1101 | this.__circles=this.calcCircles(this.__height,this.__width);
1102 | this.__scaleX = this.__width/1720.0;
1103 | this.__scaleY = this.__height/829.0;
1104 | return this;
1105 | },
1106 |
1107 | setDimension : function(height, width) {
1108 | this.__height = height;
1109 | this.__canvas.height(height);
1110 | this.__width = width;
1111 | this.__canvas.width(width);
1112 | this.__circles=this.calcCircles(this.__height,this.__width);
1113 | return this;
1114 | },
1115 |
1116 | addDrawable: function(func) {
1117 | this.__drawables.push(func);
1118 | return this;
1119 | },
1120 |
1121 | addDrawables: function(ary) {
1122 | for (var i = 0; i < ary.length; i++) {
1123 | this.addDrawable(ary[i]);
1124 | }
1125 | return this;
1126 | },
1127 |
1128 | context: function() {
1129 | return this.__context;
1130 | },
1131 |
1132 | dimensions: function() {
1133 | return { height: this.__height,width: this.__width, circles:this.__circles};
1134 | },
1135 |
1136 |
1137 |
1138 | draw: function(data) {
1139 | this.__context.save();
1140 | var config = window.cjnoyessw.configuration.getConfiguration();
1141 | var colors = window.cjnoyessw.colors.getColors();
1142 | for (var i = 0; i < this.__drawables.length; i++) {
1143 | var fnc = this.__drawables[i];
1144 | fnc(this,data,config,colors);
1145 | }
1146 | this.__context.restore();
1147 | }
1148 |
1149 | };
1150 |
1151 | window.cjnoyessw.loader = window.cjnoyessw.loader || {
1152 |
1153 |
1154 | getData : function() {
1155 | return this.__data;
1156 | },
1157 |
1158 | getChartHeader : function() {
1159 | return this.__chartHeader;
1160 | },
1161 |
1162 | getFileHeader : function() {
1163 | return this.__fileHeader;
1164 | },
1165 |
1166 | load : function(source, callback) {
1167 | var hr = $.getJSON(source, function(data) {
1168 | data.data.chartIndex=0;
1169 | window.cjnoyessw.loader.__data = data.data;
1170 | window.cjnoyessw.loader.__chartHeader = data.chartheader;
1171 | window.cjnoyessw.loader.__fileHeader = data.fileheader;
1172 | if (callback != undefined) {
1173 | callback("success");
1174 | }
1175 | }).fail(function() {
1176 | if (callback != undefined) {
1177 | callback("fail");
1178 | }
1179 | });
1180 | }
1181 |
1182 | };
1183 |
1184 |
1185 |
1186 | }());
1187 |
1188 |
1189 |
--------------------------------------------------------------------------------
/style/fonts/AstGlyphs.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
632 |
--------------------------------------------------------------------------------