Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Sydney, New South Wales, Australia
    Posts
    216
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Custom Colours (All)

    I want to set up a process where users can select specific custom colours for charting purposes. For example, when reporting on departmental activity, assuming not nulls, for different time frames, there might be all departments on the one chart, but the next time, some departments might not show if there's no activity to report. This means the each month's chart will most likely a different colour for each department. I would like to be able to keep the colours consistent for each department each month.

    Is there a relatively easy way to nominate a colour for each department, so that the charts are coloured consistently?

    Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Custom Colours (All)

    Not really. In Access, colors on a chart or graph are simply assigned in sequence. You can specify the color sequence but you can't really say that colors should be skipped if the item isn't there because the graph engine just isn't that sophisticated. The only way I could think of to work around it would be to provide dummy points of 0,0 for the missing departments when you generate the graph. That would make all the missing departments overlay in one point or line, but I doubt that's really what you wanted to do. Maybe someone else has found an ingenious workaround and will share it. <img src=/S/crossfingers.gif border=0 alt=crossfingers width=17 height=16>
    Charlotte

  3. #3
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Sydney, New South Wales, Australia
    Posts
    216
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom Colours (All)

    Oh well! Just wondering though ... is there some way to program the standard Windows colour palate to appear, then have the selected colour return the standard Windows colour number eg 255 or 0 or 16777215 as text into a corresponding departmental text field? Then maybe the graph colours could be picked up from the text box. I don't know but it sounds like a feasible concept to me: I just don't know how to do it. I guess you are right though: the graph engine isn't that sophisticated.

    Thanks for your reply,
    Nick

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Custom Colours (All)

    I just read this; I don't know if it's still relevant after three weeks. Creating consistent colors for a chart in a form or report requires non-trivial code. Microsoft provides an example in ACC97: How to Change a Chart's Colors Dynamically. I have attached a simplified sample demonstrating the use of this technique.
    Attached Files Attached Files

  5. #5
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Sydney, New South Wales, Australia
    Posts
    216
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom Colours (All)

    Thanks for responding and for the attachment and you're right about code being none too trivial! I do remember seeing that article but I must have glossed over it. It kinda makes sense though I'd have to work through it. The specific scenario I have for a client is a type of project management db. If the client can select a specific colour for each project, then the resulting graphs would be consistent and more meaningful. I could create a validation table so a specific colour could be allocated to each project, then go from there ...

    Thanks again.

Posting Permissions

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