Welcome to the forum 👋, Guest

To access the forum content and all our services, you must register or log in to the forum. Becoming a member of the forum is completely free.

  • PËRSHËNDETJE VIZITOR!

    Nëse ju shfaqet ky mesazh do të thotë se ju nuk jeni regjistruar akoma. Anëtarët e rregjistruar kanë privilegjin të marrin pjesë në tema të ndryshme si dhe të komunikojnë me anëtarët e tjerë. Bëhu pjesë e forumit Netedy.com duke u REGJISTRUAR këtu ose nëse ke një llogari KYCU. Komunikim alternative i ketij forumi me vajza dhe djem nga te gjithe trevat shqiptare? Hyr ne: CHAT SHQIP.

Statistika per ditet e muajit (Chartjs - Line)

centos

ⓃⒺⓉⒺⒹⓎ.ⒸⓄⓂ
ANETAR ✓
Regjistruar më
Dhj 13, 2004
Mesazhe
39,965
Rezultati:
39224


Kodi HTML:

HTML:
<canvas class="rounded" id="chart-line" width="1618" height="375" aria-label="Line chart" role="img"></canvas>

Requirements:
Plugins. 1: jQuery 3.3.1 / Chartjs 2.0


JavaScript:
<script>
function renderChart(data, labels) {
    var ctx = document.getElementById("chart-line").getContext('2d');
    var options = {
            legend: {
                display: !1
            },
            tooltips: {
              mode: 'x',
                xPadding: 20,
                yPadding: 10,
                displayColors: !1,
            },
            hover: {
                mode: true
            },
            scales: {
                xAxes: [
                    {
                        scaleLabel: {
                            show: !0,
                            labelString: "mole ctx"
                        },
                        ticks: {
                            fontColor: "#fff",
                            fontStyle: 600
                        }
                    }
                ],
                yAxes: [
                    {
                        display: !1
                    }
                ]
            }
        };


    var myChart = new Chart(ctx, {
        type: 'line',
        data: {
            labels: labels,
            datasets: [{
                label: 'This month so far',
                backgroundColor: ["#5a99ed"],
                borderColor: ["#fff"],
                data: data,
            }]
        },
        options: options,
    });
  }


  <?php
$month = date("m");
$year = date("Y");

$start_date = "01-".$month."-".$year;
$start_time = strtotime($start_date);

$end_time = strtotime("+1 month", $start_time);
$dN = "[";
$dt = "[";
for($i=$start_time; $i<$end_time; $i+=86400)
{
  // $dt .= "\"".date('Y-m-d', $i)."\",";
   $dt .= "\"".$i."\",";
   $dN .= "\"".date('D', $i)."\",";
}
$dt = rtrim($dt, ",");
$dt .= "]";

$dN = rtrim($dN, ",");
$dN .= "]";
  ?>
    data = <?=$dt;?>;
    labels =  <?=$dN;?>;
    renderChart(data, labels)
</script>
 
Qemolo ate app e filmave e bone ti se si emigrant skam si shty kohen
 
Qemolo ke nga kto me ?
 
Last edited:

Postime të reja

Theme customization system

You can customize some areas of the forum theme from this menu.

Choose the color combination according to your taste

Select Day/Night mode

You can use it by choosing the day and night modes that suit your style or needs.

Welcome to the forum 👋, Guest

To access the forum content and all our services, you must register or log in to the forum. Becoming a member of the forum is completely free.