Tag Archives: fix

Charts

Wikipedia – Changing Charts #2

The second in my Wikipedia chart-editing ‘project’ was this, which appeared in the article ‘Ageing of Europe‘, and displays population growth for Russia:-

Whilst it’s not the worst chart in the world, there were a few things I noticed that I was unhappy with.  First of all, the 3d effect.  That had to go.  Also, the nature of the information lends itself much better to a pair of lines for easier reading and interpretation, but there’s a minor problem – the dates are a little disjointed and move in five year increments until 2005, and then we’re seeing the data yearly.  I looked at the source of the data to see if I could find out anything else.  Here are the statistics the data is based on, according to the original chart (source):-

Years

Births

Deaths

Natural
increase, decrease (-)

Infant deaths
under 1 year old

1992

1587.6

1807.4

-219.8

29.2

1995

1363.8

2203.8

-840.0

24.8

2000

1266.8

2225.3

-958.5

19.3

2005

1457.4

2303.9

-846.5

16.1

2006

1479.6

2166.7

-687.1

15.1

2007

1610.1

2080.4

-470.3

14.9

2008

1713.9

2075.9

-362.0

14.4

2009

1761.7

2010.5

-248.8

14.3

2010

1789.6

2031.0

-241.4

13.4

As you can see, the data actually seems to have either been updated, or was incorrect in the first place, as it actually starts at 1992 and finishes at 2010.  There’s still not information for the missing years, however.

I decided to use this seemingly updated information for my chart remake.

And, here it is:-

Once again, I think this paints a clearer picture.  I normalised the date ranges so that each tick is a year – the markers in each line show points where we actually have data, which doesn’t show what happened between, say, 1992 and 1995, but flows and reads much better than before, I think.

Any thoughts/suggestions on this fix?

Tips Visual Basic For Applications (VBA)

Microsoft Listview Control – a funny little bug..


For some reason I can’t yet fathom, the Microsoft Listview control (version 6.0) occasionally really gets messed up on my computer and I can’t access the properties for it by double clicking or selecting ListViewCtrl Object>Properties from the drop-down menu.

This is, like,  well irritating, as the kids would say.

I did, however find a way around it so that the properties can be re-activated as it were – which means I don’t have to delete, and then re-create the listview control every time this happens.

The solution is straightforward:-

  1. Right click on the listview control in design mode
  2. Click on ListViewCtrl Object>Convert..
  3. From the options, choose ‘Convert To’ and make sure ListView Control, version 6.0 is selected.  The text at the bottom of the dialog will tell you that nothing will happen and that the control won’t be converted.
  4. Click OK and you should have regained control over your control!

There is, however one other thing you should do if you have this problem, and that is to ensure that, if your listview is populated using VBA you use the ListItems.Clear method to clear the contents of the control before populating them.  This might seem like an unusual statement to make, as there should be nothing if the control has not been populated, but there is another element to this bug which, for some unknown reason pre-populates the control with whatever the contents were before you made a change and saved your form.  This is not always the case but it’s certainly worth as a precaution and to ensure that the control acts properly on all users machines.