Themes Leave a comment
 
1
var chart = jui.include("chart.builder");
2
var data = [
3
    { apple : 26.1, microsoft : 24.86, oracle : 22.08 },
4
    { apple : 43.83, microsoft : 27.14, oracle : 30.15 },
5
    { apple : 55.03, microsoft : 24, oracle : 36.88 },
6
    { apple : 72.95, microsoft : 25.39, oracle : 32.78 }
7
];
8
9
chart("#result", {
10
    axis : {
11
        x : {
12
            type : "fullblock",
13
            domain : [ "2010", "2011", "2012", "2013" ],
14
            line : true
15
        },
16
        y : {
17
            type : "range",
18
            domain : function(d) {
19
                return Math.max(d.apple, d.microsoft, d.oracle);
20
            },
21
            step : 10
22
        },
23
        data : data
24
    },
25
    brush : {
26
        type : "scatter",
27
        display : "max",
28
        activeEvent : "click"
29
    },
30
    widget : [
31
        { type : "title", text : "Scatter Sample" },
32
        { type : "legend" }
33
    ]
34
});
35

Result
API

20102011201220138072645648403224168072.95Scatter Sampleapplemicrosoftoracle