none
OFFICE 2013 Graphs issue RRS feed

  • Question

  • Hi

    Currently i am develping the Graph in ms access 2013. I am facing the issue in min and max values.

    i want to know how to change the Increment value and min values in the Graphs property by Code.

    Issue : X axis value is not change dynamically. for example if x axis value is start with 1000  and i had setup the x min value was 2000 and increment values was 500 in Graph property.

    Current  Output : The X axis values  is start  with 2000.

    Expect Output : The X axis value should be start with 1000. how can i achive this by code.

    This same logic is perfectly worked in PIVO table. but office 2013 PIVOT functionality is not available. So we migrating the function to default Graphs which is available in Ms access 2013

    Is it possible to achive the PIVOT same logic  and design to  Default  Graph 2013.

    Awaiting for your reply.


    Yours friendly vengatesan.p Dot Net Development

    Wednesday, March 23, 2016 5:57 AM

Answers

  • Hi Vengatesan,

    Do you develop with Form or Report? For changing Increment value and min values for X axis or Y axis, you could set MinimumScale and MinorUnit properties for Y axis.

    Here is a simple code:

    Dim ch As Object
    Set ch = Me.Graph7.Object
    ch.Axes(xlValue).MinimumScale = 30
    ch.Axes(xlValue).MaximumScale = 400
    ch.Axes(xlValue).MajorUnit = 100
    ch.Axes(xlValue).MinorUnit = 100

    For X axis, you could try the code below:

    Dim ch As Object
    Set ch = Me.Graph7.Object
    ch.Axes(xlCategory).TickLabelSpacing = 2
    ch.Axes(xlCategory).TickMarkSpacing = 3

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.



    Thursday, March 24, 2016 5:53 AM
  • Hi Vengatesan,

    >> how can i set the x values based on the Dataset.

    What do you mean of x values and Dataset? Based on your description, when dataset start with 25000, do you want to get first column value? What do you mean with x value in “if( x value >=25000) then”?

    Since your original issue about setting X axis value has been resolved, I would suggest you mark the helpful reply as answer to close this thread, and post a new thread for this new issue about set x values based on Dataset, and share us more information about this requirement.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Marked as answer by Vengatesan Tuesday, March 29, 2016 4:58 AM
    Friday, March 25, 2016 6:33 AM

All replies

  • Hi Vengatesan,

    Do you develop with Form or Report? For changing Increment value and min values for X axis or Y axis, you could set MinimumScale and MinorUnit properties for Y axis.

    Here is a simple code:

    Dim ch As Object
    Set ch = Me.Graph7.Object
    ch.Axes(xlValue).MinimumScale = 30
    ch.Axes(xlValue).MaximumScale = 400
    ch.Axes(xlValue).MajorUnit = 100
    ch.Axes(xlValue).MinorUnit = 100

    For X axis, you could try the code below:

    Dim ch As Object
    Set ch = Me.Graph7.Object
    ch.Axes(xlCategory).TickLabelSpacing = 2
    ch.Axes(xlCategory).TickMarkSpacing = 3

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.



    Thursday, March 24, 2016 5:53 AM
  • Thanks Edward,

    how can i set the x values based on the Dataset.

    for example : the Dataset value first column start with 25000 means i wil give below logic

    Dim ch As Object
    Set ch = Me.Graph7.Object

    if( x value >=25000) then


    ch
    .Axes(xlValue).MinimumScale = 0
    ch
    .Axes(xlValue).MaximumScale = 450000
    ch
    .Axes(xlValue).MajorUnit = 50000
    ch
    .Axes(xlValue).MinorUnit = 10000

    else

    ch.Axes(xlValue).MinimumScale = 0
    ch
    .Axes(xlValue).MaximumScale = 450000
    ch
    .Axes(xlValue).MajorUnit = 25000
    ch
    .Axes(xlValue).MinorUnit = 10000

    end if

    How can i achive this based on x value dataset. Please help me to fix the issue


    Yours friendly vengatesan.p Dot Net Development

    Thursday, March 24, 2016 10:02 AM
  • Hi Vengatesan,

    >> how can i set the x values based on the Dataset.

    What do you mean of x values and Dataset? Based on your description, when dataset start with 25000, do you want to get first column value? What do you mean with x value in “if( x value >=25000) then”?

    Since your original issue about setting X axis value has been resolved, I would suggest you mark the helpful reply as answer to close this thread, and post a new thread for this new issue about set x values based on Dataset, and share us more information about this requirement.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Marked as answer by Vengatesan Tuesday, March 29, 2016 4:58 AM
    Friday, March 25, 2016 6:33 AM