/// Frank Hagen: Professional Web Developer, C# User, Reformed Über-geek RSS 2.0
# Thursday, February 19, 2009

Charting from LogParser is a very useful and powerful feature.  I enjoy collating our data into charts on hourly and daily summaries.  One of the charts I produce for my own use for the websites at work is Browser shares, like this one:

I especially like how all of the IE points are shades of blue.  Of course, you don't get that behavior out of the box.  But you can "style" the chart using a JScript config file.  The one I use is below:

// Title info
chart.Title.Font.Name = "Verdana";
chart.Title.Font.Size = 11;
chart.Title.Font.Bold = "True";

chart.SeriesCollection(0).DataLabelsCollection(0).Font.Size = 9;

for(nI=0; nI < chart.SeriesCollection(0).Points.Count; nI++)
{
    if (chart.SeriesCollection(0).Points(nI).GetValue(1) == "IE8")
        chart.SeriesCollection(0).Points(nI).Interior.Color = "#0099FF";
    if (chart.SeriesCollection(0).Points(nI).GetValue(1) == "IE7")
        chart.SeriesCollection(0).Points(nI).Interior.Color = "#008FE1";
    if (chart.SeriesCollection(0).Points(nI).GetValue(1) == "IE6")
        chart.SeriesCollection(0).Points(nI).Interior.Color = "#3876B7";
    if (chart.SeriesCollection(0).Points(nI).GetValue(1) == "Firefox")
        chart.SeriesCollection(0).Points(nI).Interior.Color = "#D87023";
    if (chart.SeriesCollection(0).Points(nI).GetValue(1) == "Safari")
        chart.SeriesCollection(0).Points(nI).Interior.Color = "#CFCCCC";
    if (chart.SeriesCollection(0).Points(nI).GetValue(1) == "Chrome")
        chart.SeriesCollection(0).Points(nI).Interior.Color = "#2DB632";
    if (chart.SeriesCollection(0).Points(nI).GetValue(1) == "Opera")
        chart.SeriesCollection(0).Points(nI).Interior.Color = "#BC1B12";
    if (chart.SeriesCollection(0).Points(nI).GetValue(1).substring(0,8) == "Netscape")
        chart.SeriesCollection(0).Points(nI).Interior.Color = "#246C6D";
}
Thursday, February 19, 2009 2:54:38 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
LogParser
All comments require the approval of the site owner before being displayed.
OpenID
Please login with either your OpenID above, or your details below.
Name
E-mail
(will show your gravatar icon)
Home page

Comment (Some html is allowed: b, blockquote@cite, i, strike, strong, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview
<%--
--%>
Statistics
Total Posts: 189
This Year: 2
This Month: 0
This Week: 0
Comments: 74
Locations of visitors to this page
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2012
Frank W Hagen
Sign In
All Content © 2012, Frank W Hagen
Custom DasBlog theme based on 'Business' by Christoph De Baene