Блог пользователя sjsakib

Автор sjsakib, история, 7 лет назад, По-английски

Hello guys! A new feature (heatmap) was added to the Codeforces Visualizer I shared few days earlier. Hope it'll be useful. Unfortunately the solved problem counting issue is still not fixed. I'm still trying. I'll remove this feature if I don't succeed. Thanks!

  • Проголосовать: нравится
  • +78
  • Проголосовать: не нравится

»
7 лет назад, # |
  Проголосовать: нравится +18 Проголосовать: не нравится

Can you make the upper bound, which is "7" in your example, adjustable? There were a few days I made last number of submission, which is not the case in general. I want to use a smaller upper bound. Otherwise, the heatmap of me looks very bad.

  • »
    »
    7 лет назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится

    Sorry I couldn't find a easy way to do this. But I tried to make it look a bit better.

    • »
      »
      »
      7 лет назад, # ^ |
        Проголосовать: нравится +10 Проголосовать: не нравится

      I could help you with that.

      I checked your code and did a little research about google.visualization.Calendar. You can call draw method for the same object with diffrent Configuration Options as many times you want.

      One way to tackle this is to make an input field and add Enter keypress event. Depending on user input, you will set colorAxis.maxValue in configuration options and call draw method for the previously created heatmap.

      • »
        »
        »
        »
        7 лет назад, # ^ |
        Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

        I thought about that too. But since it works just fine already, I decided not to add input field there. I believe it will hurt the UI.

        • »
          »
          »
          »
          »
          7 лет назад, # ^ |
            Проголосовать: нравится +10 Проголосовать: не нравится

          I have tested with custom code and it works perfect. This is what i have changed.

          index.html

          <div id="heatmapCon" class="hidden to-hide card mdl-shadow--2dp mdl-cell mdl-cell--8-col mdl-cell--11-col-desktop">
            <span id="heatmapTitle">Submissions HeatMap of 
              <span id="heatMapHandle"></span>
            </span>
            <!-- Custom input for heat table -->
            <div>
              <span>Set max value: <input type="number"></span>
            </div>
            <div class="to-clear" id="heatmapDiv"></div>
          </div>
          

          single.js

          Make var heatmapData global and add this code to the document.ready().