Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {% for i in range(0,10) %}
- <div id='freqDigitR2L_div{{i}}' class="chart chart_2L" style="display:{% if i == 0 %} block {% else %} none {% endif %}; padding-top: 25px; ">
- <h4 style="padding-bottom: 20px; font-weight: bold;">สถิติการออกรางวัลย้อนหลัง {{ i+1 }} ปี<br>แบบแบ่งแยกตามหลัก</h4>
- <p style="padding-bottom: 25px;">รวมสถิติการออกรางวัลย้อนหลัง {{ i+1 }} ปี รวมทั้งหมด {{ (i+1)*24 }} งวด</p>
- <div id='freqDigitR2L{{i}}' style="height: 400px; width: 500px margin: 0 auto"></div>
- </div>
- <div class="table" id='freqNumR2L{{i}}' style="display:{% if i == 0 %} block {% else %} none {% endif %}; padding-top: 25px;">
- <h4 style="padding-bottom: 25px; font-weight: bold;">สถิติการออกรางวัลย้อนหลัง {{ i+1 }} ปี<br>แบบแบ่งตามจำนวนครั้งที่ออก</h4>
- {% set dataR2L = freqR2L%}
- <div class="table-responsive-md">
- <table class="table table-hover table-bordered">
- <thead class="thead-info">
- <tr class="bg-info">
- <th width="20%">จำนวนครั้ง</th>
- <th width="80%">หมายเลขท้าย 2 ตัวที่ออกรางวัล</th>
- </tr>
- </thead>
- <tbody>
- {% for j in range(dataR2L[i]|max + 1, 0, -1)%}
- {% set temp_index = loop.revindex0 %}
- <tr>
- {% if temp_index == 0 %}
- <td class="active"> ยังไม่เคยออก </td><td class="active">
- {% else %}
- <td> {{temp_index}} ครั้ง </td><td>
- {% endif %}
- {% for k in range(0, 100)%}
- {% if dataR2L[i][k] == temp_index %}
- {% if k//10 == k%10 or k == 0 %}
- <b>{{ "{:02d}".format(k) }}</b>
- {% else %}
- {{ "{:02d}".format(k) }}
- {% endif %}
- {% endif %}
- {% endfor %}
- </td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- </div>
- </div>
- {% endfor %}
- --------------------------------------
- $(document).ready(function(){
- $('#statsYearR2L').on('change', function(){
- var demovalue = $(this).val();
- $("div.chart_2L").hide();
- $("div.table").hide();
- $("#freqDigitR2L_div"+demovalue).show();
- $("#freqNumR2L"+demovalue).show();
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement