2

I have 4000 columns and 200 rows in an excel spreadsheet, I want to make a line chart with all data in it, but once I created the chart, it is too hard to see each individual item in the chart even if I zoom the page to max.

enter image description here

Is there any better idea to make a chart that contains huge amount of data and also be able to zoom in to see each individual item?

ChrisM
  • 1,576
  • 6
  • 18
  • 29
Root Loop
  • 3,004
  • 9
  • 46
  • 72

1 Answers1

4

You can add a second Chart to use like a Zoom:

enter image description here

With a Scrollbar ActiveX you can scroll (Zoom) the Big chart reducing the range of the data:

Private Sub ScrollBar1_Change()
    Dim xx As Integer
    xx = ScrollBar1.Value
    ActiveSheet.ChartObjects("Chart 2").Activate
    ActiveChart.PlotArea.Select
    ActiveChart.SetSourceData Source:=Range("B" & xx & ":C" & xx + 3)
End Sub

If you want you can have the Vertical value Fix or Variable. I have added a Combo to select:

Private Sub ComboBox1_Change()
    Dim Fixed As Single

    If ComboBox1.Value = "Fix" Then
        ActiveSheet.ChartObjects("Chart 1").Activate
        ActiveChart.PlotArea.Select
        Fixed = ActiveChart.Axes(xlValue).MaximumScale
        ActiveSheet.ChartObjects("Chart 2").Activate
        ActiveChart.PlotArea.Select
        ActiveChart.Axes(xlValue).MaximumScale = Fixed
    Else
        ActiveSheet.ChartObjects("Chart 2").Activate
        ActiveChart.PlotArea.Select
        ActiveChart.Axes(xlValue).MaximumScaleIsAuto = True
    End If
End Sub
user3514930
  • 1,721
  • 1
  • 9
  • 7