Coder Social home page Coder Social logo

gitcraft-calendar-graph's People

Watchers

 avatar

gitcraft-calendar-graph's Issues

Заменить константы отступов и размеров на задаваемые в конфиге переменные

Добавить следующие конфиги:
monthxs = 25 73 133 181 229 277 337 385 433 493 541 601
monthy = -10
dayx = -14
dayys = 8 20 32 44 57 69 81

Где содержатся значения из следующих строк HTML:

<text x="25" y="-10" class="month">Nov</text>
<text x="73" y="-10" class="month">Dec</text>
<text x="133" y="-10" class="month">Jan</text>
<text x="181" y="-10" class="month">Feb</text>
<text x="229" y="-10" class="month">Mar</text>
<text x="277" y="-10" class="month">Apr</text>
<text x="337" y="-10" class="month">May</text>
<text x="385" y="-10" class="month">Jun</text>
<text x="433" y="-10" class="month">Jul</text>
<text x="493" y="-10" class="month">Aug</text>
<text x="541" y="-10" class="month">Sep</text>
<text x="601" y="-10" class="month">Oct</text>
<text text-anchor="start" class="wday" dx="-14" dy="8" style="display: none;">Sun</text>
<text text-anchor="start" class="wday" dx="-14" dy="20">Mon</text>
<text text-anchor="start" class="wday" dx="-14" dy="32" style="display: none;">Tue</text>
<text text-anchor="start" class="wday" dx="-14" dy="44">Wed</text>
<text text-anchor="start" class="wday" dx="-14" dy="57" style="display: none;">Thu</text>
<text text-anchor="start" class="wday" dx="-14" dy="69">Fri</text>
<text text-anchor="start" class="wday" dx="-14" dy="81" style="display: none;">Sat</text>
</g>

и

x = 13
y = 12

из следующих строк кода:

    for var x := 0 to b.Width - 1 do
    begin
      sw.WriteLine($'<g transform="translate({x*13}, 0)">');
      
      for var y := 0 to b.Height - 1 do
        sw.WriteLine(
 	        $'<rect class="day" width="10" height="10" ' +
 	        $'x="{13-x}" ' +
 	        $'y="{y*12}" ' +
 	        $'fill="#{ccl?find_color(b.GetPixel(x,y)):(b.GetPixel(x,y).ToArgb and $FFFFFF).ToString(''x'').PadLeft(6,''0'')}" ' +
 	        $'data-count="0" data-date="2017-10-29"></rect>');
      
      sw.WriteLine('</g>');
    end;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.