Results 1 to 1 of 1
  1. #1
    Join Date
    Aug 2002
    Posts
    33

    Unanswered: Bold (draw) a single x axis (horizontal) gridline using OWC Chart 9

    Hey Guys,

    I can't believe something so seemingly simple can be so darn hard!

    I'm using OWC Chart 9, and got everything working fine. The only thing I can't figure out is how to draw a horizontal line (or make a gridline bold).

    My values are anywhere from lets say -10 to 10, and I want the 0 horizontal gridline bold so that the user can easily spot it.

    My searches have only fruited plotting a line at the zero point, but that stinks becuase it shows the end points in the chart.

    For the real adventurous out there, I also need to figure out a way to stick image icons at particular points. My code is below

    Thanks!

    Code:
    With Me.CtrlSumRefractionHistory
        .Clear
        .Charts.Add
        .Charts(0).Type = .Constants.chChartTypeLine
        .Charts(0).HasLegend = True
        .Charts(0).Axes(0).MajorUnit = 0.5
    
        .Charts(0).SeriesCollection.Add
        .Charts(0).SeriesCollection(0).SetData .Constants.chDimCategories, .Constants.chDataLiteral, DOS
    
        .Charts(0).SeriesCollection.Add
        .Charts(0).SeriesCollection(1).Caption = "OD"
        .Charts(0).SeriesCollection(1).SetData .Constants.chDimCategories, .Constants.chDataLiteral, ODDOS
        .Charts(0).SeriesCollection(1).SetData .Constants.chDimValues, .Constants.chDataLiteral, OD
        .Charts(0).SeriesCollection(1).Line.Color = RGB(255, 0, 0)
        
        .Charts(0).SeriesCollection.Add
        .Charts(0).SeriesCollection(2).Caption = "OS"
        .Charts(0).SeriesCollection(2).SetData .Constants.chDimCategories, .Constants.chDataLiteral, OSDOS
        .Charts(0).SeriesCollection(2).SetData .Constants.chDimValues, .Constants.chDataLiteral, OS
        .Charts(0).SeriesCollection(2).Line.Color = RGB(0, 0, 255)
        
        
        
        
        .Charts(0).Legend.LegendEntries(0).Visible = False
        
        ' Format the bottom chart axis values as currency.
        '.Charts(0).Axes(.Constants.chAxisPositionBottom).NumberFormat = "m/d/y"
    End With
    Last edited by absoffthewake; 01-02-08 at 16:45.

Posting Permissions

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