½ÃÀÛÆäÀÌÁö·Î Áñ°Üã±âÃß°¡
·Î±×ÀÎ
ȸ¿ø°¡ÀÔ l Ã⼮üũ l ¸¶ÀÌÆäÀÌÁö l CGIMALL
½ºÅ³À» Ç¥ÇöÇϱâ ÁÁÀº ¾Ö´Ï¸ÞÀÌ¼Ç ¼Ò½º Stats animation : happycgi
ÀÚ·á½Ç »çÀÌÆ®µî·Ï ·©Å·100 ÇÁ·Î±×·¥¸®ºä °ü¸®ÀÚÃßõÀÚ·á Ãʺ¸°¡À̵å
Ä¿¹Â´ÏƼ
Àüü ÆîÃ帱â
Äü¸Þ´º¸µÅ© jquery , CSS , PHP , Javascript , ¹«·áÆùÆ® , ASP
»ó¼¼°Ë»ö
Ȩ > CSS > ±âŸȿ°ú > ½ºÅ³À» Ç¥ÇöÇϱâ ÁÁÀº ¾Ö´Ï¸ÞÀÌ¼Ç ¼Ò½º Stats animation »ó¼¼Á¤º¸
»çÀÌÆ®µî·Ï
Ŭ¶ó¿ìµåű×
javascript
HTML
PHP
Api
2022
CSS
ASP
mysql
Slide
jquery
¸ðµâ
Ä«¿îÅÍ
°¶·¯¸®
ÇöÀçÁ¢¼ÓÀÚ ¸í »õ·Î°íħ
½ºÅ³À» Ç¥ÇöÇϱâ ÁÁÀº ¾Ö´Ï¸ÞÀÌ¼Ç ¼Ò½º Stats animation
¼Ò½ºÅë°èÁ¤º¸ ¿À·ù½Å°í ¹× ¹®ÀÇ
ÇØÇÇÆÀ
³×ƼÁð
Æ®À§ÅÍ·Î º¸³»±â ÆäÀ̽ººÏÀ¸·Î º¸³»±â
¼Ò½ººÐ·ù ±âŸȿ°ú
´Ù¿î·Îµå Ƚ¼ö 0 ȸ
°£´Ü¼³¸í À¥»çÀÌÆ®, ´ë½Ãº¸µå, Æ÷Æ®Æú¸®¿À µî¿¡¼­ ÇÙ½É µ¥ÀÌÅͳª ½ºÅ³, ¼º°ú ÁöÇ¥¸¦ Á÷°üÀûÀÌ°í °¨°¢ÀûÀ¸·Î Ç¥ÇöÇÒ ¼ö ÀÖ´Â Stats Animation ¼Ò½ºÀÔ´Ï´Ù.
Æò°¡Çϱâ ÈǸ¢ÇÔ ¸Å¿ìÁÁÀ½ ÁÁÀ½ ±¦ÂúÀ½ º¸Åë º°·Î
ȨÆäÀÌÁö¹Ù·Î°¡±â µ¥¸ð ¹Ì¸®º¸±â ½ºÅ©·¦Çϱâ
 

À¥»çÀÌÆ®, ´ë½Ãº¸µå, Æ÷Æ®Æú¸®¿À µî¿¡¼­ ÇÙ½É µ¥ÀÌÅͳª ½ºÅ³, ¼º°ú ÁöÇ¥¸¦ Á÷°üÀûÀÌ°í °¨°¢ÀûÀ¸·Î Ç¥ÇöÇÒ ¼ö ÀÖ´Â ¾Ö´Ï¸ÞÀÌ¼Ç ¼Ò½ºÀÔ´Ï´Ù.
 

°³ÀÎ ÇÁ·ÎÁ§Æ®, °ü¸®ÀÚ ´ë½Ãº¸µå, ¼­ºñ½º ¼Ò°³ ÆäÀÌÁöÀÇ Åë°è ¼½¼Ç µî À¯¿ëÇÏ°Ô »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.
 


HTML ±¸Á¶

<div class="charts-container cf">

  <div class="chart" id="graph-1-container">

    <h2 class="title">Hours worked</h2>

    <div class="chart-svg">

      <svg class="chart-line" id="chart-1" viewBox="0 0 80 40">

        <defs>

          <clipPath id="clip" x="0" y="0" width="80" height="40" >

            <rect id="clip-rect" x="-80" y="0" width="77" height="38.7"/>

          </clipPath>


        <linearGradient id="gradient-1">

            <stop offset="0" stop-color="#00d5bd" />

            <stop offset="100" stop-color="#24c1ed" />

        </linearGradient>


        <linearGradient id="gradient-2">

            <stop offset="0" stop-color="#954ce9" />

            <stop offset="0.3" stop-color="#954ce9" />

            <stop offset="0.6" stop-color="#24c1ed" />

            <stop offset="1" stop-color="#24c1ed" />

        </linearGradient>



          <linearGradient id="gradient-3" x1="0%" y1="0%" x2="0%" y2="100%">>

            <stop offset="0" stop-color="rgba(0, 213, 189, 1)" stop-opacity="0.07"/>

            <stop offset="0.5" stop-color="rgba(0, 213, 189, 1)" stop-opacity="0.13"/>

            <stop offset="1" stop-color="rgba(0, 213, 189, 1)" stop-opacity="0"/>

        </linearGradient>

 

.
.
.

 



CSS(SCSS) ¼Ò½º

h1{

  font-size:28px;

  line-height:40px;

  margin-top:20px;

  a{

    text-decoration:none;

    color:$green;

  }

  p{

    font-size:22px;

  }

}

#grid{

  @include transform(translate(1px,0px));

}

/* GRAPH - 1 */

#graph-1{

  stroke:url(#gradient-1);

  stroke-width:1.5;

  fill:transparent;

  stroke-linecap:round;

  stroke-linejoin:round;

  @include animation (lineani 1.3s linear forwards);

}

#graph-2{

  stroke:url(#gradient-2);

  stroke-width:1.5;

  fill:transparent;

  stroke-linecap:round;

  stroke-linejoin:round;

  @include animation (lineani 1.3s linear forwards);

}

#poly-1{

  fill:url(#gradient-3);

}

#poly-2{

  fill:url(#gradient-4);

}

@include keyframes (lineani){

  to{

    stroke-dashoffset:0;

  }

}

.underlay{

  stroke-width:5;

  fill:transparent;

  stroke-linecap:round;

  stroke-linejoin:round;

  stroke:$bgc;

}

#circle-graph-1{

  stroke:url(#gradient-1);

  stroke-width:5;

  fill:transparent;

  stroke-linecap:round;

  stroke-linejoin:round;

}

.chart-circle{

  @include transform(rotate(90deg));

}

#circle-graph-2{

  stroke:url(#gradient-2);

  stroke-width:5;

  fill:transparent;

  stroke-linecap:round;

  stroke-linejoin:round;

}

body{

  background-color: $bgc;

  color:white;

  text-align:center;

}

.
.
.


JS ¼Ò½º

/* DRAW GRID */

function drawGrid(graph) {

    var graph = Snap(graph);

    var g = graph.g();

    g.attr('id', 'grid');

    for (i = 0; i <= stepX + 2; i++) {

        var horizontalLine = graph.path(

            "M" + 0 + "," + stepX * i + " " +

            "L" + 77 + "," + stepX * i);

        horizontalLine.attr('class', 'horizontal');

        g.add(horizontalLine);

    };

    for (i = 0; i <= 14; i++) {

        var horizontalLine = graph.path(

            "M" + stepX * i + "," + 38.7 + " " +

            "L" + stepX * i + "," + 0)

        horizontalLine.attr('class', 'vertical');

        g.add(horizontalLine);

    };

}

drawGrid('#chart-2');

drawGrid('#chart-1');


function drawLineGraph(graph, points, container, id) {



    var graph = Snap(graph);

.
.
.

ÇØ´ç »çÀÌÆ®·Î À̵¿ÇÏ¿© Àüü ¼Ò½º¸¦ È®ÀÎÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.


³×ƼÁð ÀÇ°ß   ÀÌ¿ëÇϽŠÀÚ·áÀÇ Èı⸦ ÀÚÀ¯·Ó°Ô ÀÛ¼ºÇϼ¼¿ä. (»ó¾÷ÀûÀÎ ±¤°í ¹× µµ¹è¼º ±Û µîÀº »çÀüÅ뺸¾øÀÌ »èÁ¦µÉ ¼ö ÀÖ½À´Ï´Ù.)
³»¿ë ¾ÆÀ̵ð Àǰ߳²±â±â
µî·ÏµÈ ÀǰßÀÌ ¾ø½À´Ï´Ù.
1
À̸§
³»¿ë
:³×¸Â¾Æ¿ä: :È­³ª´Â±º¿ä: :Àá¿Í: :¿ì¿ïÇØ: :À̰ǾƳÄ: :¿ÕÇÏÇÏ: ¿Õ¿ôÀ½~ ³î·¥~
Æò°¡Çϱâ ÈǸ¢ÇÔ ¸Å¿ìÁÁÀ½ ÁÁÀ½ ±¦ÂúÀ½ º¸Åë º°·Î
µµ¹è¹æÁöŰ
 16105850 º¸ÀÌ´Â µµ¹è¹æÁö۸¦ ÀÔ·ÂÇϼ¼¿ä.