Results 1 to 3 of 3

Thread: Chart labels

  1. #1
    Join Date
    Jun 2007
    Posts
    40

    Unanswered: Chart labels

    I am trying to create a chart based on a table. The table is quite simple, but for the purposes of this post I will use a sample table given below:

    Code:
    SampleName SampleValue
             A           1
             B           2
             C           3
             D           4
    So I would want a pie-chart, with labels A, B, C and D in the legend, and the "pie" split into chunks of 0.4, 0.3, 0.2 and 0.1. However, I cannot seem to work out how to do this. Since Name is a Text field, it does not appear in the list of fields in the chart wizard. If I edit the labels manually (which is not good anyway because the "Name" fields could change in the future), then they just change back when I switch from Design view to Form view. I also tried to edit the autogenerated SQL query for the object to "GROUP BY [SampleName]" instead, but this produced an error.

  2. #2
    Join Date
    Jun 2007
    Posts
    40
    Quote Originally Posted by kidburla
    I am trying to create a chart based on a table. The table is quite simple, but for the purposes of this post I will use a sample table given below:

    Code:
    SampleName SampleValue
             A           1
             B           2
             C           3
             D           4
    So I would want a pie-chart, with labels A, B, C and D in the legend, and the "pie" split into chunks of 0.4, 0.3, 0.2 and 0.1. However, I cannot seem to work out how to do this. Since Name is a Text field, it does not appear in the list of fields in the chart wizard. If I edit the labels manually (which is not good anyway because the "Name" fields could change in the future), then they just change back when I switch from Design view to Form view. I also tried to edit the autogenerated SQL query for the object to "GROUP BY [SampleName]" instead, but this produced an error.
    I didn't get a response on this, but I fixed it myself eventually. I needed to put two fields in the "GROUP BY" clause and also remove the Sum() aggregate function which was automatically generated by the Chart wizard.

  3. #3
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Thank you for posting the solution back to the forum kidburla! Anyone who is searching for the answer to a similar problem in the future will appreciate it greatly

    And congratulations on working it out by yourself
    George
    Home | Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •