Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Wykres sin</title>
- </head>
- <body>
- <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
- <div id="chart_div"></div>
- <script type="text/javascript">
- function roundToTwo(num) {
- return +(Math.round(num + "e+2") + "e-2");
- }
- google.charts.load('current', {packages: ['corechart', 'line']});
- google.charts.setOnLoadCallback(drawAxisTickColors);
- function drawAxisTickColors() {
- var data = new google.visualization.DataTable();
- data.addColumn('number', 'X');
- data.addColumn('number', 'sin');
- var kat=0;
- var radiany =0;
- var punkty ="";
- for(i=0;i<360;i++){
- radiany = i * (Math.PI/180);
- //document.write(i +" --- "+ radiany + " --- " + roundToTwo(Math.sin(radiany)) +"<br>");
- }
- data.addRows([
- [0,0], [1,0.02], [2,0.03], [3,0.05], [4,0.07], [5,0.09], [6,0.1], [7,0.12], [8,0.14], [9,0.16], [10,0.17], [11,0.19], [12,0.21], [13,0.22], [14,0.24], [15,0.26], [16,0.28], [17,0.29], [18,0.31], [19,0.33], [20,0.34], [21,0.36], [22,0.37], [23,0.39], [24,0.41], [25,0.42], [26,0.44], [27,0.45], [28,0.47], [29,0.48], [30,0.5], [31,0.52], [32,0.53], [33,0.54], [34,0.56], [35,0.57], [36,0.59], [37,0.6], [38,0.62], [39,0.63], [40,0.64], [41,0.66], [42,0.67], [43,0.68], [44,0.69], [45,0.71], [46,0.72], [47,0.73], [48,0.74], [49,0.75], [50,0.77], [51,0.78], [52,0.79], [53,0.8], [54,0.81], [55,0.82], [56,0.83], [57,0.84], [58,0.85], [59,0.86], [60,0.87], [61,0.87], [62,0.88], [63,0.89], [64,0.9], [65,0.91], [66,0.91], [67,0.92], [68,0.93], [69,0.93], [70,0.94], [71,0.95], [72,0.95], [73,0.96], [74,0.96], [75,0.97], [76,0.97], [77,0.97], [78,0.98], [79,0.98], [80,0.98], [81,0.99], [82,0.99], [83,0.99], [84,0.99], [85,1], [86,1], [87,1], [88,1], [89,1], [90,1], [91,1], [92,1], [93,1], [94,1], [95,1], [96,0.99], [97,0.99], [98,0.99], [99,0.99], [100,0.98], [101,0.98], [102,0.98], [103,0.97], [104,0.97], [105,0.97], [106,0.96], [107,0.96], [108,0.95], [109,0.95], [110,0.94], [111,0.93], [112,0.93], [113,0.92], [114,0.91], [115,0.91], [116,0.9], [117,0.89], [118,0.88], [119,0.87], [120,0.87], [121,0.86], [122,0.85], [123,0.84], [124,0.83], [125,0.82], [126,0.81], [127,0.8], [128,0.79], [129,0.78], [130,0.77], [131,0.75], [132,0.74], [133,0.73], [134,0.72], [135,0.71], [136,0.69], [137,0.68], [138,0.67], [139,0.66], [140,0.64], [141,0.63], [142,0.62], [143,0.6], [144,0.59], [145,0.57], [146,0.56], [147,0.54], [148,0.53], [149,0.52], [150,0.5], [151,0.48], [152,0.47], [153,0.45], [154,0.44], [155,0.42], [156,0.41], [157,0.39], [158,0.37], [159,0.36], [160,0.34], [161,0.33], [162,0.31], [163,0.29], [164,0.28], [165,0.26], [166,0.24], [167,0.22], [168,0.21], [169,0.19], [170,0.17], [171,0.16], [172,0.14], [173,0.12], [174,0.1], [175,0.09], [176,0.07], [177,0.05], [178,0.03], [179,0.02], [180,0], [181,-0.02], [182,-0.03], [183,-0.05], [184,-0.07], [185,-0.09], [186,-0.1], [187,-0.12], [188,-0.14], [189,-0.16], [190,-0.17], [191,-0.19], [192,-0.21], [193,-0.22], [194,-0.24], [195,-0.26], [196,-0.28], [197,-0.29], [198,-0.31], [199,-0.33], [200,-0.34], [201,-0.36], [202,-0.37], [203,-0.39], [204,-0.41], [205,-0.42], [206,-0.44], [207,-0.45], [208,-0.47], [209,-0.48], [210,-0.5], [211,-0.52], [212,-0.53], [213,-0.54], [214,-0.56], [215,-0.57], [216,-0.59], [217,-0.6], [218,-0.62], [219,-0.63], [220,-0.64], [221,-0.66], [222,-0.67], [223,-0.68], [224,-0.69], [225,-0.71], [226,-0.72], [227,-0.73], [228,-0.74], [229,-0.75], [230,-0.77], [231,-0.78], [232,-0.79], [233,-0.8], [234,-0.81], [235,-0.82], [236,-0.83], [237,-0.84], [238,-0.85], [239,-0.86], [240,-0.87], [241,-0.87], [242,-0.88], [243,-0.89], [244,-0.9], [245,-0.91], [246,-0.91], [247,-0.92], [248,-0.93], [249,-0.93], [250,-0.94], [251,-0.95], [252,-0.95], [253,-0.96], [254,-0.96], [255,-0.97], [256,-0.97], [257,-0.97], [258,-0.98], [259,-0.98], [260,-0.98], [261,-0.99], [262,-0.99], [263,-0.99], [264,-0.99], [265,-1], [266,-1], [267,-1], [268,-1], [269,-1], [270,-1], [271,-1], [272,-1], [273,-1], [274,-1], [275,-1], [276,-0.99], [277,-0.99], [278,-0.99], [279,-0.99], [280,-0.98], [281,-0.98], [282,-0.98], [283,-0.97], [284,-0.97], [285,-0.97], [286,-0.96], [287,-0.96], [288,-0.95], [289,-0.95], [290,-0.94], [291,-0.93], [292,-0.93], [293,-0.92], [294,-0.91], [295,-0.91], [296,-0.9], [297,-0.89], [298,-0.88], [299,-0.87], [300,-0.87], [301,-0.86], [302,-0.85], [303,-0.84], [304,-0.83], [305,-0.82], [306,-0.81], [307,-0.8], [308,-0.79], [309,-0.78], [310,-0.77], [311,-0.75], [312,-0.74], [313,-0.73], [314,-0.72], [315,-0.71], [316,-0.69], [317,-0.68], [318,-0.67], [319,-0.66], [320,-0.64], [321,-0.63], [322,-0.62], [323,-0.6], [324,-0.59], [325,-0.57], [326,-0.56], [327,-0.54], [328,-0.53], [329,-0.52], [330,-0.5], [331,-0.48], [332,-0.47], [333,-0.45], [334,-0.44], [335,-0.42], [336,-0.41], [337,-0.39], [338,-0.37], [339,-0.36], [340,-0.34], [341,-0.33], [342,-0.31], [343,-0.29], [344,-0.28], [345,-0.26], [346,-0.24], [347,-0.22], [348,-0.21], [349,-0.19], [350,-0.17], [351,-0.16], [352,-0.14], [353,-0.12], [354,-0.1], [355,-0.09], [356,-0.07], [357,-0.05], [358,-0.03], [359,-0.02],[360,0]
- ]);
- var options = {
- hAxis: {
- title: '',
- textStyle: {
- color: '#01579b',
- fontSize: 20,
- fontName: 'Arial',
- bold: true,
- italic: true
- },
- titleTextStyle: {
- color: '#01579b',
- fontSize: 16,
- fontName: 'Arial',
- bold: false,
- italic: true
- }
- },
- vAxis: {
- title: '',
- textStyle: {
- color: '#1a237e',
- fontSize: 24,
- bold: true
- },
- titleTextStyle: {
- color: '#1a237e',
- fontSize: 24,
- bold: true
- }
- },
- colors: ['#a52714', '#097138'],
- 'width':1500,
- 'height':700
- };
- var chart = new google.visualization.LineChart(document.getElementById('chart_div'));
- chart.draw(data, options);
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement