EditorLabsRW / Dashboards

0 stars 0 forks source link

Graf til forside (Tipsbladet) #2

Closed EditorLabsRW closed 8 years ago

EditorLabsRW commented 8 years ago

På Tipsbladets forside skal der være en række grafer. Vedhæftede graf skal give Tipsbladet et overblik over, hvordan de klarer sig i dag.

date skal være time i stedet og vise time på dagen. Startende ved 0 og gå til 23. 0 = 00.00 til 00.59 1 = 01.00 til 01.59 osv

PV today = Pageviews på alle artikler Average PV = Average pageviews for samme dag i gennemsnit de seneste x-uger tilbage (vil forslå 52 hvis muligt)

Articles today og Average Wed: Artikler per time henholdsvis i dag og gennemsnitligt for samme uge dag.

I forhold til farver, så kunne jeg ikke lige se, hvilken parameter, der kunne ændre det. Men jeg vil gerne, at Pageviews og Articles today bliver samme farve. Og ligeså for Average PV og Articles.

`var chart = AmCharts.makeChart("chartdiv", { "type": "serial", "theme": "light", "legend": { "equalWidths": false, "useGraphSettings": true, "valueAlign": "left", "valueWidth": 120 },

"dataProvider": [{
    "date": "2012-01-00",
    "Articles Today:": 4,
    "Average Wed:": 2.4,
    "PV today": 714,
    "Average PV": 808
}, {
    "date": "2012-01-01",
    "Articles Today:": 4,
    "Average Wed:": 2.4,
    "PV today": 306,
    "Average PV": 372.75
}, {
    "date": "2012-01-02",
    "Articles Today:": 1,
    "Average Wed:": 0.7,
    "PV today": 197,
    "Average PV": 233.5
}, {
    "date": "2012-01-03",
    "Articles Today:": 0,
    "Average Wed:": 0.1,
    "PV today": 144,
    "Average PV": 167.375
}, {
    "date": "2012-01-04",
    "Articles Today:": 0,
    "Average Wed:": 0.1,
    "PV today": 165,
    "Average PV": 176.875
}, {
    "date": "2012-01-05",
    "Articles Today:": 1,
    "Average Wed:": 0.2,
    "PV today": 449,
    "Average PV": 392.625
}, {
    "date": "2012-01-06",
    "Articles Today:": 1,
    "Average Wed:": 0.9,
    "PV today": 928,
    "Average PV": 912.25
}, {
    "date": "2012-01-07",
    "Articles Today:": 4,
    "Average Wed:": 4.7,
    "PV today": 1919,
    "Average PV": 1524.5
}, {
    "date": "2012-01-08",
    "Articles Today:": 9,
    "Average Wed:": 7.5,
    "PV today": 2463,
    "Average PV": 2380.875
}, {
    "date": "2012-01-09",
    "Articles Today:": 8,
    "Average Wed:": 6.8,
    "PV today": 2865,
    "Average PV": 2845.25
}, {
    "date": "2012-01-10",
    "Articles Today:": 4,
    "Average Wed:": 6.1,
    "PV today": 3157,
    "Average PV": 3183.625
}, {
    "date": "2012-01-11",
    "Articles Today:": 6,
    "Average Wed:": 7.6,
    "PV today": 3009,
    "Average PV": 2697.75
}, {
    "date": "2012-01-12",
    "Articles Today:": 8,
    "Average Wed:": 7.9,
    "PV today": 2939,
    "Average PV": 2844.625,
    "dashLength3": 8
}, {
    "date": "2012-01-13",
    "Articles Today:": 5,
    "Average Wed:": 6.4,
    "Average PV": 2698.875,
    "PV today": 1040,
    "dashLength": 8,
    "alpha": 0.15
}, {
    "date": "2012-01-14",
    "Average Wed:": 6.4,
    "Average PV": 2780.25,
    "alpha": 0.15
}, {
    "date": "2012-01-15",
    "Average Wed:": 5.9,
    "Average PV": 2598.125,
    "alpha": 0.15
}, {
    "date": "2012-01-16",
    "Average Wed:": 6.1,
    "Average PV": 2215.625,
    "alpha": 0.15
}, {
    "date": "2012-01-17",
    "Average Wed:": 4.3,
    "Average PV": 2201.875,
    "alpha": 0.15
}, {
    "date": "2012-01-18",
    "Average Wed:": 2.7,
    "Average PV": 2121.25,
    "alpha": 0.15
}, {
    "date": "2012-01-19",
    "Average Wed:": 3.1,
    "Average PV": 2306.125,
    "alpha": 0.15
}, {
    "date": "2012-01-20",
    "Average Wed:": 3.8,
    "Average PV": 2800.75,
    "alpha": 0.15
}, {
    "date": "2012-01-21",
    "Average Wed:": 2.7,
    "Average PV": 2239.125,
    "alpha": 0.15
}, {
    "date": "2012-01-22",
    "Average Wed:": 2.1,
    "Average PV": 1950.125,
    "alpha": 0.15
}, {
    "date": "2012-01-23",
    "Average Wed:": 1.8,
    "Average PV": 1471,
    "alpha": 0.15
}],
"valueAxes": [{
    "id": "distanceAxis",
    "axisAlpha": 0,
    "gridAlpha": 0,
    "position": "left",
    "title": "# Articles"
}, {
    "id": "pageviewAxis",
    "axisAlpha": 0,
    "gridAlpha": 0,
    "labelsEnabled": false,
    "position": "right",
    "title": "Pageviews"
},],
"graphs": [{
    "alphaField": "alpha",
    "balloonText": "[[value]] miles",
    "dashLengthField": "dashLength",
    "fillAlphas": 0.7,
    "legendPeriodValueText": "total: [[value.sum]] mi",
    "legendValueText": "[[value]] mi",
    "title": "Articles Today:",
    "type": "column",
    "valueField": "Articles Today:",
    "valueAxis": "distanceAxis"
}, {
    "alphaField": "alpha",
    "balloonText": "[[value]] miles",
    "dashLengthField": "dashLength2",
    "fillAlphas": 0.4,
    "legendPeriodValueText": "total: [[value.sum]] mi",
    "legendValueText": "[[value]] mi",
    "title": "Articles Wed:",
    "type": "column",
    "valueField": "Average Wed:",
    "valueAxis": "distanceAxis"
}, {
    "balloonText": "PV today:[[value]]",
    "bullet": "round",
    "bulletBorderAlpha": 1,
    "useLineColorForBulletBorder": true,
    "bulletColor": "#FFFFFF",
    "bulletSizeField": "townSize",
    "dashLengthField": "dashLength3",
    "descriptionField": "townName",
    "labelPosition": "right",
    "labelText": "[[townName2]]",
    "legendValueText": "[[description]]/[[value]]",
    "title": "PV today",
    "fillAlphas": 0,
    "valueField": "PV today",
    "valueAxis": "pageviewAxis"
}, {
    "bullet": "square",
    "bulletBorderAlpha": 1,
    "bulletBorderThickness": 1,
    "dashLengthField": "dashLength2",
    "legendValueText": "[[value]]",
    "title": "Average PV",
    "fillAlphas": 0,
    "valueField": "Average PV",
    "valueAxis": "pageviewAxis"
}],
"chartCursor": {
    "categoryBalloonDateFormat": "DD",
    "cursorAlpha": 0.1,
    "cursorColor":"#000000",
     "fullWidth":true,
    "valueBalloonsEnabled": false,
    "zoomable": false
},
"dataDateFormat": "YYYY-MM-DD",
"categoryField": "date",
"categoryAxis": {
    "dateFormats": [{
        "period": "DD",
        "format": "DD"
    }, {
        "period": "WW",
        "format": "MMM DD"
    }, {
        "period": "MM",
        "format": "MMM"
    }, {
        "period": "YYYY",
        "format": "YYYY"
    }],
    "parseDates": true,
    "autoGridCount": false,
    "axisColor": "#555555",
    "gridAlpha": 0.1,
    "gridColor": "#FFFFFF",
    "gridCount": 50
},
"export": {
    "enabled": true
 }

});`

EditorLabsRW commented 8 years ago

Det er denne graf i AMChart, der er inspiration: https://www.amcharts.com/demos/duration-on-value-axis/

mortenanders commented 8 years ago

Ser sådan her ud i første forsøg. Har ikke brugt farverkoder fra templaten. Det bør man gøre.

2016-06-23_22h18_42