« Previous Next »

Thread: Pie Chart Labels

Last post 02-01-2008 3:27 AM by kewlapps. 5 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (6 items)

Sort Posts:

  • 08-23-2005, 5:27 PM

    Pie Chart Labels

    Some Pie Charts by default have labels on the items, and others do not. When using the COM input and the CHART output.

    No Labels

    With Labels

     

    I guess my question is how do I get the second chart to not have labels?

    Below is the code that generated both...

     

    1
    2
    3
    4// First Chart
    5// Query = "SELECT sc-status AS StatusCode, MUL(PROPSUM(1),100.0) AS PercentHits INTO %OUTPUT%percentstatus.gif FROM %INPUT%ex*.log GROUP BY StatusCode ORDER BY PercentHits DESC";
    6// Function call = lp.genImageIIS(query, "PieExploded3D", "Status Codes", "460x280", configFile);
    7    public void genImageIIS(string inputQuery, string type, string title, string size, string config)
    8    {
    9        string query = filter(inputQuery);
    10        oChartOuputFormat.chartTitle = title;
    11        oChartOuputFormat.chartType = type;
    12        oChartOuputFormat.groupSize = size;
    13        oChartOuputFormat.config = filter(config);
    14        if (timeFormat != null)
    15            oChartOuputFormat.timestampFormat = timeFormat;
    16
    17        oLogQuery.ExecuteBatch(query, oIISW3CInputFormat, oChartOuputFormat);
    18    }
    19
    20// Second Chart
    21// Query = "SELECT Browser AS Browser, Percent AS Percentage INTO %OUTPUT%browser.gif FROM %OUTPUT%browser.csv ORDER BY Percent DESC";
    22// Function call = lp.genImageCSV(query, "PieExploded3D", "Browsers", "460x280", configFile);
    23    public void genImageCSV(string inputQuery, string type, string title, string size, string config)
    24    {
    25        string query = filter(inputQuery);
    26        oChartOuputFormat.chartTitle = title;
    27        oChartOuputFormat.chartType = type;
    28        oChartOuputFormat.groupSize = size;
    29        oChartOuputFormat.config = filter(config);
    30        iCSVInputFormat.headerRow = true;
    31        if (timeFormat != null)
    32            oChartOuputFormat.timestampFormat = timeFormat;
    33
    34        oLogQuery.ExecuteBatch(query, iCSVInputFormat, oChartOuputFormat);
    35    }
  • 08-24-2005, 1:56 AM In reply to

    Hi,

    When you create Pie chart and category (first) column has string type category names are displayed on chart. TO avvoid this you should change your chart config file by adding following code to it:

    chart.SeriesCollection(0).DataLabelsCollection(0).HasCategoryName=false;

    More about config scripts you can read in this post:

    http://www.logparser.com/instantforum33/shwmessage.aspx?ForumID=32&MessageID=2330

     

  • 08-24-2005, 7:29 AM In reply to

    Igor,

    Thank you for the information, I tried to get something similar to this in my config file...

    Last night after I posted this question I found a good reference for the object model (it happened to be in the LogParser reference guide (I should read this before posting ...)

    So here is the link that leads to the object model for those who are curious for the chart scripts.

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/owcvba10/html/octocChartWorkspaceObjectModel.asp?frame=true
  • 08-24-2005, 10:01 AM In reply to

    Hi,

    Yes, I'm using MSDN to find information too. But you should notice that some methods and classes in OWC model don't work due to LP configures chart that it creates with some parameters and you can't change this in config scripts. For example, you can't create multiply charts image using config script but using direct call (simple .js or .vbs files) you can.

    In my docs that I post to this forum I'm trying to post only wellworking sample of scripts for people who don't have time to experiment with MSDN samples. BTW, more good links about CHART in MSDN are: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/owcvba11/html/ocobjChartSpace.asp and http://msdn.microsoft.com/library/default.asp?url=/library/en-us/owcvba11/html/ocobjChCharts.asp

     

     

  • 11-06-2007, 6:49 PM In reply to

    using vbs config script with logparser

    a year or so ago I found 2 good word documents I believe written by Igor on manipulating the charts with some advanced techniques.  I am trying to find those documents but all the links I find on the site go to logparser.com and are not valid.  Mainly I recall they had ways to adjust the colors of certain parts of the bar charts, for example if processor was over 70, then the portion above the 70 would be yellow or red, and below 70 would be say green.  The documents were great but I can no longer locate them on here and would like to review them again.

    Some of the examples were something similar to this, below I am dynamically building the config before running the chart.

    echo chart.Title.Font.Size=16 >> chart_config.vbs
    echo chart.Title.Font.Name="Trebuchet MS" >> chart_config.vbs
    echo chart.GapDepth = 30 >> chart_config.vbs
    echo chart.GapWidth = 30 >> chart_config.vbs
    echo chart.ChartDepth = 75 >> chart_config.vbs
    echo chart.Rotation = %therotation% >> chart_config.vbs
    echo chart.Inclination = %theincline% >> chart_config.vbs
    echo chart.LightNormal = 0.8 >> chart_config.vbs
    echo chart.AmbientLightIntensity = 0.7 >> chart_config.vbs
    echo chart.DirectionalLightRotation = picnum >> chart_config.vbs

    Thanks for the help,

    Nigel

     

  • 02-01-2008, 3:27 AM In reply to

    Re: using vbs config script with logparser

    Hi,

    I understand that is very late to ask in this thread but appeciate if anyone can psot that doc again. I am in need of such chart capabilities, when the data beyond a certain threshold is shown in a red.

    Thanks.

Page 1 of 1 (6 items)
Microsoft Communities