mirror of
https://github.com/Steffo99/unimore-bda-3.git
synced 2024-11-22 16:04:21 +00:00
35 lines
36 KiB
JavaScript
35 lines
36 KiB
JavaScript
|
|
||
|
Charts.Load().then(function() {
|
||
|
let tooltip = {"valueDecimals":2,"valuePrefix":"","valueSuffix":"\u20ac"};
|
||
|
let max = 29.99;
|
||
|
|
||
|
let chartOverview = (function() {
|
||
|
let setup = (new Charts.Gallery.History.Price())
|
||
|
.setTitle("Price (EUR)");
|
||
|
|
||
|
return (new Charts.Builder(setup, [{"zIndex":4,"name":"Best Price","data":[[1519805701000,22.99],[1519841773000,22.99],[1524590259000,22.99],[1524592024000,20.69],[1524851235000,20.69],[1524852989000,22.99],[1525971444000,22.99],[1525972147000,20.69],[1525974508000,20.69],[1525976215000,17.24],[1526318331000,17.24],[1526319979000,20.69],[1527179667000,20.69],[1527182687000,22.99],[1529600398000,22.99],[1529611632000,17.24],[1530807576000,17.24],[1530810790000,22.99],[1532970422000,22.99],[1532971227000,17.24],[1533574167000,17.24],[1533574935000,22.99],[1535648356000,22.99],[1535649232000,17.24],[1536080211000,17.24],[1536081380000,16.09],[1536339689000,16.09],[1536340369000,17.24],[1536857882000,17.24],[1536859133000,16.09],[1537203520000,16.09],[1537204637000,22.99],[1540832482000,22.99],[1540842105000,17.24],[1541091955000,17.24],[1541110899000,22.99],[1542125441000,22.99],[1542136543000,17.24],[1542304350000,17.24],[1542306330000,17.24],[1542564455000,17.24],[1542564882000,17.24],[1542816466000,17.24],[1542827856000,17.24],[1543341096000,17.24],[1543342361000,17.24],[1543345223000,17.24],[1543348730000,22.99],[1544464656000,22.99],[1544465356000,17.24],[1545069409000,17.24],[1545070262000,22.99],[1545329299000,22.99],[1545339341000,17.24],[1546538222000,17.24],[1546541607000,22.99],[1547142611000,22.99],[1547143783000,17.24],[1548697638000,17.24],[1548698486000,22.99],[1549303549000,22.99],[1549306966000,17.24],[1549908115000,17.24],[1549912181000,22.99],[1551376847000,22.99],[1551377811000,17.24],[1551723068000,17.24],[1551724897000,22.99],[1553089037000,22.99],[1553793871000,22.99],[1553793872000,16.81],[1553807711000,16.81],[1553808726000,16.81],[1554090362000,16.81],[1554138622000,27.99],[1558545469000,27.99],[1558547194000,18.75],[1559061686000,18.75],[1559063788000,27.99],[1561500160000,27.99],[1561501810000,18.19],[1562688504000,18.19],[1562705079000,27.99],[1564667200000,27.99],[1564679155000,18.19],[1565011606000,18.19],[1565025056000,27.99],[1568308202000,27.99],[1568309226000,0],[1568309226000,18.19],[1568826398000,18.19],[1568826412000,27.99],[1568827289000,27.99],[1572282356000,27.99],[1572283414000,20.99],[1572628027000,20.99],[1572629140000,27.99],[1573401673000,27.99],[1573402946000,24.91],[1573574931000,24.91],[1573575735000,27.99],[1574359579000,27.99],[1574360475000,18.75],[1574373680000,18.75],[1574374552000,18.75],[1575396610000,18.75],[1575397630000,18.75],[1575407459000,18.75],[1575409645000,27.99],[1576778992000,27.99],[1576780074000,18.75],[1577988251000,18.75],[1577990123000,27.99],[1579802863000,27.99],[1579804008000,19.59],[1580148713000,19.59],[1580149491000,27.99],[1582826824000,27.99],[1582827689000,13.99],[1584036300000,13.99],[1584037284000,27.99],[1585941267000,27.99],[1585941681000,27.99],[1586157230000,27.99],[1586157588000,29.99],[1593101345000,29.99],[1593109652000,22.49],[1594314740000,22.49],[1594315488000,29.99],[1595524579000,29.99],[1595527411000,20.99],[1596129863000,20.99],[1596130384000,29.99],[1597706319000,29.99],[1597709355000,22.49],[1598329007000,22.49],[1598330495000,29.99],[1599753754000,29.99],[1599757646000,20.99],[1601006539000,20.99],[1601008757000,20.99],[1601313027000,20.99],[1601313766000,29.99],[1601313767000,29.99],[1601315340000,29.99],[1603987513000,29.99],[1603991315000,20.99],[1604340870000,20.99],[1604341420000,29.99],[1606324301000,29.99],[1606329291000,20.99],[1606586458000,20.99],[1606588829000,20.99],[1606843068000,20.99],[1606845648000,20.99],[1607450729000,20.99],[1607451672000,29.99],[1608660895000,29.99],[1608663745000,20.99],[1609869877000,20.99],[1609872952000,29.99],[1613066675000,29.99],[1613070171000,19.49],[1613412344000,19.49],[1613413287000,29.99],[1614276755000,29.99],[1614277281000,19.49],[1615741861000,19.49],[1615742472000,29.99],[1620666090000,29.99],[1620669048000,19.49],[1620925539000,19.49],[1620926310000,17.99],[1621008299000,17.99],[1621011631000,17.99],[1621015936000,17.99],[1621016139000,17.99],[1621354160000,17.99],[1621357250000,17.99],[1621703290000,17.99],[1621703903000,29.99],[1624381877000,29.99],[16243822970
|
||
|
.setTooltip(tooltip)
|
||
|
.setDefaultValueRange(0, max)
|
||
|
.enableLegend()
|
||
|
.enableRangeSelector();
|
||
|
})();
|
||
|
|
||
|
let chartDetail = (function(){
|
||
|
let setup = (new Charts.Gallery.History.Price())
|
||
|
.useThinLine()
|
||
|
.setTooltipDealFormat()
|
||
|
.setTitle("Price (EUR)");
|
||
|
|
||
|
return (new Charts.Builder(setup, [{"name":"Humble Store","data":[[1519805701000,22.99],[1519841773000,22.99],[1524590259000,22.99],[1524592024000,22.99],[1524851235000,22.99],[1524852989000,22.99],[1525971444000,22.99],[1525972147000,20.69],[1525974508000,20.69],[1525976215000,20.69],[1526318331000,20.69],[1526319979000,20.69],[1527179667000,20.69],[1527182687000,22.99],[1529600398000,22.99],[1529611632000,22.99],[1530807576000,22.99],[1530810790000,22.99],[1532970422000,22.99],[1532971227000,17.24],[1533574167000,17.24],[1533574935000,22.99],[1535648356000,22.99],[1535649232000,17.24],[1536080211000,17.24],[1536081380000,17.24],[1536339689000,17.24],[1536340369000,17.24],[1536857882000,17.24],[1536859133000,16.09],[1537203520000,16.09],[1537204637000,22.99],[1540832482000,22.99],[1540842105000,22.99],[1541091955000,22.99],[1541110899000,22.99],[1542125441000,22.99],[1542136543000,22.99],[1542304350000,22.99],[1542306330000,17.24],[1542564455000,17.24],[1542564882000,17.24],[1542816466000,17.24],[1542827856000,17.24],[1543341096000,17.24],[1543342361000,22.99],[1543345223000,22.99],[1543348730000,22.99],[1544464656000,22.99],[1544465356000,17.24],[1545069409000,17.24],[1545070262000,22.99],[1545329299000,22.99],[1545339341000,22.99],[1546538222000,22.99],[1546541607000,22.99],[1547142611000,22.99],[1547143783000,17.24],[1548697638000,17.24],[1548698486000,22.99],[1549303549000,22.99],[1549306966000,22.99],[1549908115000,22.99],[1549912181000,22.99],[1551376847000,22.99],[1551377811000,22.99],[1551723068000,22.99],[1551724897000,22.99],[1553089037000,22.99],[1553793871000,null],[1553793872000,16.81],[1553807711000,16.81],[1553808726000,16.81],[1554090362000,16.81],[1554138622000,27.99],[1558545469000,27.99],[1558547194000,27.99],[1559061686000,27.99],[1559063788000,27.99],[1561500160000,27.99],[1561501810000,27.99],[1562688504000,27.99],[1562705079000,27.99],[1564667200000,27.99],[1564679155000,18.19],[1565011606000,18.19],[1565025056000,27.99],[1568308202000,27.99],[1568309226000,27.99],[1568309226000,27.99],[1568826398000,27.99],[1568826412000,27.99],[1568827289000,27.99],[1572282356000,27.99],[1572283414000,27.99],[1572628027000,27.99],[1572629140000,27.99],[1573401673000,27.99],[1573402946000,27.99],[1573574931000,27.99],[1573575735000,27.99],[1574359579000,27.99],[1574360475000,27.99],[1574373680000,27.99],[1574374552000,18.75],[1575396610000,18.75],[1575397630000,18.75],[1575407459000,18.75],[1575409645000,27.99],[1576778992000,27.99],[1576780074000,27.99],[1577988251000,27.99],[1577990123000,27.99],[1579802863000,27.99],[1579804008000,27.99],[1580148713000,27.99],[1580149491000,27.99],[1582826824000,27.99],[1582827689000,27.99],[1584036300000,27.99],[1584037284000,27.99],[1585941267000,27.99],[1585941681000,27.99],[1586157230000,27.99],[1586157588000,29.99],[1593101345000,29.99],[1593109652000,29.99],[1594314740000,29.99],[1594315488000,29.99],[1595524579000,29.99],[1595527411000,20.99],[1596129863000,20.99],[1596130384000,29.99],[1597706319000,29.99],[1597709355000,22.49],[1598329007000,22.49],[1598330495000,29.99],[1599753754000,29.99],[1599757646000,29.99],[1601006539000,29.99],[1601008757000,20.99],[1601313027000,20.99],[1601313766000,null],[1601313767000,null],[1601315340000,29.99],[1603987513000,29.99],[1603991315000,29.99],[1604340870000,29.99],[1604341420000,29.99],[1606324301000,29.99],[1606329291000,29.99],[1606586458000,29.99],[1606588829000,20.99],[1606843068000,20.99],[1606845648000,29.99],[1607450729000,29.99],[1607451672000,29.99],[1608660895000,29.99],[1608663745000,29.99],[1609869877000,29.99],[1609872952000,29.99],[1613066675000,29.99],[1613070171000,29.99],[1613412344000,29.99],[1613413287000,29.99],[1614276755000,29.99],[1614277281000,29.99],[1615741861000,29.99],[1615742472000,29.99],[1620666090000,29.99],[1620669048000,19.49],[1620925539000,19.49],[1620926310000,19.49],[1621008299000,19.49],[1621011631000,29.99],[1621015936000,29.99],[1621016139000,19.49],[1621354160000,19.49],[1621357250000,29.99],[1621703290000,29.99],[1621703903000,29.99],[1624381877000,29.99],[1624382297000,29.99
|
||
|
.setTooltip(tooltip)
|
||
|
.setDefaultValueRange(0, max)
|
||
|
.enableRangeSelector();
|
||
|
})();
|
||
|
|
||
|
(new Charts.Tabs("cp", "chart-price"))
|
||
|
.add("overview", chartOverview)
|
||
|
.add("detail", chartDetail)
|
||
|
.load();
|
||
|
});
|
||
|
|