What is this chart? And, how do I make this chart with Excel?

tjreeddoc

New Member
Joined
Nov 2, 2016
Messages
14
All,

I am hoping someone can help me with a chart.

I would like to learn how to make a chart like the one below.

I am using Excel 2016 on running on a PC that runs Windows 10 Enterprise v1803

Questions:


  • What type of chart is this?
  • How do I make a chart like this with following:
I have 1000 Servers. I would like to update my chart with:

150 red dots that represent 150 Red Hat Servers

750 blue dots that represent 750 Windows Server 2016

100 green does that represent 100 Windows Server

Thank you,
tjreedoc Chart.jpg
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Well TJ,
It's definitely in the realm of a perforation chart of some kind. The only way I was able to reproduce it was with some clever worksheet manipulation and some coding. It's manual for now but it could use some looping.... but for now.

2020-09-10_11-15-11.jpg


VBA Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
  Dim FontColor As Long
  Dim iSect As Range
  Set iSect = Intersect(Target, Range("WholeBigRange"))
 If Not iSect Is Nothing Then
  Cancel = True
  Select Case ActiveCell.Font.Color
    
    Case 16777215: FontColor = vbBlue ' if White make Blue
    Case 16711680: FontColor = vbRed  ' if Blue make Red
    Case 255: FontColor = vbGreen     ' if Red make Green
    Case Else: FontColor = vbWhite    ' or just make White
  End Select
  ActiveCell.Font.Color = FontColor

  End If
    
End Sub

Add a module with the following code:

VBA Code:
Public Function CountColor(pRange1 As Range, pRange2 As Range) As Double

Application.Volatile
Dim rng As Range

For Each rng In pRange1
    If rng.Font.Color = pRange2.Font.Color Then
        CountColor = CountColor + 1
    End If
Next

End Function

As long as you stay within the boundaries of the (WholeBigRange), then you are free to move the dots (which are Windings letter "little L").

Doubleclick in the dots and they will change color for you. Now I can't imagine doing this for 1000 dots, so if someone can figure out a way to loop through the colored dots the right about of times (example: make them all white, then make X amt turn BLUE; then X amt turn GREEN and then X amount turn RED ) then that would work for you. It's a start.
 
Upvote 0
Well TJ,
It's definitely in the realm of a perforation chart of some kind. The only way I was able to reproduce it was with some clever worksheet manipulation and some coding. It's manual for now but it could use some looping.... but for now.

View attachment 22138

VBA Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
  Dim FontColor As Long
  Dim iSect As Range
  Set iSect = Intersect(Target, Range("WholeBigRange"))
If Not iSect Is Nothing Then
  Cancel = True
  Select Case ActiveCell.Font.Color
   
    Case 16777215: FontColor = vbBlue ' if White make Blue
    Case 16711680: FontColor = vbRed  ' if Blue make Red
    Case 255: FontColor = vbGreen     ' if Red make Green
    Case Else: FontColor = vbWhite    ' or just make White
  End Select
  ActiveCell.Font.Color = FontColor

  End If
   
End Sub

Add a module with the following code:

VBA Code:
Public Function CountColor(pRange1 As Range, pRange2 As Range) As Double

Application.Volatile
Dim rng As Range

For Each rng In pRange1
    If rng.Font.Color = pRange2.Font.Color Then
        CountColor = CountColor + 1
    End If
Next

End Function

As long as you stay within the boundaries of the (WholeBigRange), then you are free to move the dots (which are Windings letter "little L").

Doubleclick in the dots and they will change color for you. Now I can't imagine doing this for 1000 dots, so if someone can figure out a way to loop through the colored dots the right about of times (example: make them all white, then make X amt turn BLUE; then X amt turn GREEN and then X amount turn RED ) then that would work for you. It's a start.
Thosny,

Thank you!
Let me see about taking the next step with VBA!
 
Upvote 0

Forum statistics

Threads
1,215,647
Messages
6,126,006
Members
449,280
Latest member
Miahr

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top