sunserega / gitcraft-calendar-graph Goto Github PK
View Code? Open in Web Editor NEWLets you add stuff on Calendar Graph of your profile (only until F5)
License: The Unlicense
Lets you add stuff on Calendar Graph of your profile (only until F5)
License: The Unlicense
Добавить следующие конфиги:
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;
Сделать массив имён месяцев (Nov, Dec, Jan...) и дней
startmonth = 11
- должна дать знать программе то, что пишем месяцы, начиная с Ноября
startday = 1
- аналогично для дня недели
Для удобства желательно в конфиге начинать с единицы
dx =13
Однако на выходе имеем следующее:
<g transform="translate(0, 0)">
<g transform="translate(11, 0)">
<g transform="translate(22, 0)">
Здесь коэффициент всё ещё 11
Воспользуйся функцией
function IntToBool(a: integer): boolean := a=1;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.