Results 1 to 2 of 2
  1. #1
    EricRex is offline Advanced Beginner
    Windows 11 Access 2021
    Join Date
    May 2024
    Location
    Colorado
    Posts
    85

    Workaround to Implement Modern Chart Gridlines

    Hey there,

    Hopefully this post will help someone else out. According to my web searches, Microsoft has not seen fit to implement Gridlines in Modern Charts yet.



    I just discovered a way to do it, although it's not particularly flexible unless you create some parameters and/or some VBA code to make it so.

    In my chart query, I simply put a constant into the SELECT statement which shows up as a horizontal gridline on the chart when you select the query as the chart data source.

    Example query:
    SELECT MyDate AS CatDate, 0 AS Zero, YValue AS DataVal FROM MyTable;

    In my real chart, I need/want Zero as a line on the chart because the data value crossing above or below Zero is a significant event.

    The example could be expanded with more constants, or create VBA code that examines the dataset and creates several appropriate constants in the final query. Or, you could create a Parameter Query that you can pass in the gridline constants as arguments.

    Guessing that you could implement Vertical Gridlines by creating a column in the table for the same query that has some maximum values and the rest are the bottom of the appropriate scale. This might work in some circumstances and not others. If you put it in a cluster column chart, you can give that dataset a column width of 1, or something like that.

    Hope that helps!
    Eric

  2. #2
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Gridlines will be available in the forthcoming improvement to modern charts due for release to the current channel at the end of August (A365 only)
    The feature is I believe already available for those in the Beta Channel

    There will also be additional chart types that may help your scenario

    Click image for larger version. 

Name:	ModernChartsMenu.png 
Views:	8 
Size:	12.0 KB 
ID:	52050
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Modern chart upcoming!
    By diegomarino in forum Access
    Replies: 0
    Last Post: 05-23-2024, 10:17 AM
  2. Data Labels on Modern Chart
    By dunc723 in forum Reports
    Replies: 0
    Last Post: 01-20-2023, 01:50 PM
  3. Replies: 1
    Last Post: 11-11-2021, 07:00 AM
  4. Modern Chart vs Classic Chart
    By jschneiter in forum Access
    Replies: 3
    Last Post: 04-05-2021, 10:56 AM
  5. Replies: 5
    Last Post: 05-10-2017, 02:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums