Filled Patterns For Xy Chart Lines

  • Hello,


    I have an xy chart for which I would like to format the lines to be different patterns beyond those available in the format series dialog. I recognise that this will mean using VBA and I am happy to do that. I would like to be able to use patterns in the same way as they are used in a column chart.


    I recorded a macro to see which properties were changed when the patterns are selected in the dialog for the xy chart and it is clear that it is only the LineStyle of the border and that there is no interior.


    Code
    With Selection.Border
            .ColorIndex = 57
            .Weight = xlMedium
            .LineStyle = xlGray25
        End With


    This would explain why when I use debug.print ser.Interior.Pattern I get -4105 or if I change ser.Fill.Forecolor etc it has no effect.


    Is there any way to use user defined patterns to colour the lines in the same way as in a histogram/coloumn chart?


    Thanks,


    Alan.

  • Re: Filled Patterns For Xy Chart Lines


    There are no patterns for line fill.


    You can change the solid to a dash or a shaded line. But even with VBA you can not change the built-in styles.


    It's possible you could build the chart using Autoshape lines and some serious VBA.


    Do you have a example data file?

    [h4]Cheers
    Andy
    [/h4]

  • Re: Filled Patterns For Xy Chart Lines


    Andy,


    Thanks for confirming what I thought was the case.


    I am trying to create a wind/wave rose and I can generate the data from various types of sources but needed to be able to change the line thickness and symbology to conform to some standards.


    I am actually developing in VB and do not have a good charting tool and was going to try and use Excel's capability but I guess I am back to the drawing board (or have to buy a charting tool that wil do the job).


    Do you know any cheap/freebie charting tools for VS2005? (sorry question is off the forum subject!:) )


    Thanks again,


    Alan.

  • Re: Filled Patterns For Xy Chart Lines


    Thanks Andy,


    I would need to learn alot for that and I need a quick solution (as ever) and so I will use the XY chart in Reporting Services and change the line thickness. It is not ideal but it will work.


    I will then look to develop my own class/component at some point for drawing these special graphs that I need.


    Thanks for your guidance,


    A.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!