sjsakib's blog

By sjsakib, history, 6 years ago, In English

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!

 
 
 
 
  • Vote: I like it
  • +78
  • Vote: I do not like it

| Write comment?
»
6 years ago, # |
  Vote: I like it +18 Vote: I do not like it

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.

  • »
    »
    6 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

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

    • »
      »
      »
      6 years ago, # ^ |
        Vote: I like it +10 Vote: I do not like it

      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.

      • »
        »
        »
        »
        6 years ago, # ^ |
        Rev. 2   Vote: I like it 0 Vote: I do not like it

        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.

        • »
          »
          »
          »
          »
          6 years ago, # ^ |
            Vote: I like it +10 Vote: I do not like it

          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().