annotate geotemco/js/FuzzyTimeline/FuzzyTimelineConfig.js @ 0:57bde4830927

first commit
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Tue, 24 Mar 2015 11:37:17 +0100
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1 /*
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
2 * FuzzyTimelineConfig.js
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
3 *
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
4 * Copyright (c) 2013, Sebastian Kruse. All rights reserved.
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
5 *
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
6 * This library is free software; you can redistribute it and/or
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
7 * modify it under the terms of the GNU Lesser General Public
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
8 * License as published by the Free Software Foundation; either
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
9 * version 3 of the License, or (at your option) any later version.
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
10 *
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
11 * This library is distributed in the hope that it will be useful,
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
14 * Lesser General Public License for more details.
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
15 *
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
16 * You should have received a copy of the GNU Lesser General Public
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
17 * License along with this library; if not, write to the Free Software
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
19 * MA 02110-1301 USA
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
20 */
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
21
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
22 /**
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
23 * @class FuzzyTimelineConfig
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
24 * FuzzyTimeline Configuration File
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
25 * @author Sebastian Kruse (skruse@mpiwg-berlin.mpg.de)
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
26 */
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
27 function FuzzyTimelineConfig(options) {
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
28
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
29 this.options = {
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
30 //TODO: experiment with number of ticks, 150 seems to be ok for now
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
31 maxBars : 50,
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
32 maxDensityTicks : 150,
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
33 /*drawing modes:
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
34 * fuzzy - weight is distributed over all spans an object overlaps, so that the sum remains the weight,
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
35 * stacking - every span that on object overlaps gets the complete weight (limited by the amount the span is overlapped, e.g. first span and last might get less)
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
36 */
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
37 timelineMode : 'stacking',
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
38 showRangePiechart : false,
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
39 backgroundColor : "#EEEEEE",
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
40 showYAxis : true,
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
41 //whether time-spans that "enlargen" the plot are allowed
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
42 //if set to true, a span that creates more "bars" than fit on the screen
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
43 //will lead to a width-increase of the chart (and a scroll bar appears)
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
44 showAllPossibleSpans : true,
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
45 };
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
46 if ( typeof options != 'undefined') {
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
47 $.extend(this.options, options);
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
48 }
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
49
57bde4830927 first commit
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
50 };