An ActiveX Control to Display Distribution Graphs

Environment: VC6 SP3, NT4 SP3

This ActiveX control is intended to display a distribution graph of numerical datas. The datas are split among a set of constant intervals. The horizontal axis displays the interval values. The vertical axis shows the number of occurences (percentage) of numerical datas in each interval.

Each data is combined with a date. When the user clicks on one of the vertical bars, a small windows displays all the couples (value,date) bounded be the interval.

The user of the control is allowed to specify :

  • either the interval value either the number of intervals (these two values are related),
  • a display unit (unity, thousand or million),
  • the background color,
  • the vertical bars color

There is little chance this control meets your need. But it can help you if you have something similar to do.

The source project contains two ATL objects :

  • the control itself (CDistributionGraph)
  • a simple ATL object used to store historical datas (CHistoricalDatas)

HistoricalDatas contains the following methods and properties :

AddEntry( DATE date, double value) Add a couple (date,value) in the historic
long     Length Return number of datas
double Value(long index ) Get value at specified index
DATE Date(long index )  Get date at specified index

DistributionGraph contains the following methods and properties :

HistoricalDatas Set/Get the historical datas
double Interval Set/Get the interval value
long IntervalCount Set/Get the number of intervals
Units DisplayUnits Set/Get the display unit (One,Thousand or Million)

The two demo project (VB and VC++) show how to populate the control. The VC++ project contains two wrapper classes (CHistoricalDatas and CDistributionGraph) which have been generated by ClassWizard using Project|Add to Project|Components and control

Sample Visual Basic code

 

Dim hDatas As New HistoricalDatas
Dim d As Date
Dim v As Double
d = Date
For i = 0 To 200
    v = Rnd(1) * 10000
    hDatas.AddEntry DateAdd("d", i, d), v
Next i
DistributionGraph.HistoricalDatas = hDatas

Sample VC++ code

fHistoricalDatas.CreateDispatch("DGraph.HistoricalDatas.1") ;
COleDateTime date = COleDateTime::GetCurrentTime();    ;
const COleDateTimeSpan oneDay( 1, 0, 0, 0 ) ;

for ( int i = 0 ; i < 200 ; i++ )
{
	fHistoricalDatas.AddEntry( date, (10000*::rand())/RAND_MAX ) ;
	date += oneDay ;
}
fGraph.SetFillColor( RGB( 255, 0, 0 ) ) ;
fGraph.SetBackColor( ::GetSysColor( COLOR_WINDOW ) ) ; 
fGraph.SetHistoricalDatas( fHistoricalDatas ) ;
fGraph.SetDisplayUnits( 0 ) ;

Downloads

Download Visual Basic demo project - 7 Kb
Download Visual C++ demo project - 17 Kb
Download source - 59 Kb

Note : Before executing demo projects, the ActiveX control must first be registered (compile it or use regsvr32).



Comments

  • グッチ グッチ 財布 グッチ バッグ コーチ コーチ バッグ コーチ 財布

    Posted by scgchurtis on 07/19/2013 06:00pm

    クロエ アシスタント兼任 ルイヴィトン 財布 誹謗Jr ミュウミュウ 財布 ^^ グッチ ムスクなどがゴージャスでセクシー [url=http://johnpat.com/brand/miumiu/]ミュウミュウ[/url] [url=http://www.shopandmunch.com/brand/miumiu/]ミュウミュウ 財布[/url] miumiu 財布 クロエ 新作 ルイヴィトン 新作 シャネル 財布 プラダ アウトレット chanel 財布 プラダ ルイヴィトン コーチ プラダ バッグ 新作

    Reply
  • ihpgqsdpl

    Posted by Allonnanvam on 06/26/2013 09:40am

    rzjddqzmf www.coachonlyone.com コーチ財布,コーチ アウトレット,コーチバッグ,コーチ,COACH fvggubisf http://www.coachonlyone.com/

    Reply
  • hot sales

    Posted by kellywhosal47 on 05/24/2013 09:44pm

    Hermes Outlet Apart from to several roles Plancha Tory Burch Cabello Plancha Tory Burch De Ceramics along with tiawan Por Mayoreo by firm on the emission, austere the many attacker catapult armed forces abstruse secret headquarters, many of the intense every one of the abstruse hq. Hermes Birkin That is why the lower the APR is, the greater it can be her or him since it indicates they have got to fork out much less fascination. Hermes Handbags The chocolate brown leather looks really classic especially with gold tone hardware all throughout. Mulberry Outlet Why not replicas? Replicas never can compare to actual Vuittons. Mulberry Gardez quipe rencontres confrences imaginatives innovantes rponses Suivant , loigner de actuellement l'entreprise propritaire prend normalement sans rapport deux mots et mix eux de faire un nouveau, beaucoup plus accrocheur mot . Mulberry Sale They will not only help you save a lot of cash to generate the different options, their families, but also can get a couple at the expense of the small proportion, in the commodity area. http://hermesoutlet.partytalent.biz/ - hermes handbags http://hermesoutlet.uome.us/ - hermes handbags http://hbags.incomingsms.com/ - hermes handbags With the wide variety of materials to choose from that sticks could very well be done from, it can be practical to have so much of flex from your stick. But I'm not sure I want to wear a Frank Stella, either.

    Reply
  • levy mlb jerseys

    Posted by hwardevev on 04/21/2013 07:07pm

    cheap Clarisonic cleansers clarisonic sale Clarisonic cleansers outlet clarisonic outlet store cheap clarisonic sale canada cheap clarisonic mia canada cheap clarisonic sale uk clarisonic uk authentic nfl jerseys new nba jerseys

    Reply
  • fake oakley sunglasses

    Posted by qgliliImpumpnom on 03/29/2013 10:11am

    http://bestsunglassesshop.webs.com - cheap fake oakley sunglasses fake ray ban sunglasses http://guccisunglassescheap.webs.com - ray ban sunglasses cheap oakleys cheap http://qualityguccisunglass.webs.com - cheap ray ban sunglasses discount ray ban sunglasses http://akeoakleysunglasses.webs.com - fake oakley sunglasses discount ray ban sunglasses http://akeoakleysunglasses.webs.com - fake ray ban wayfarer cheap sunglasses

    Reply
  • Sexy Underwear

    Posted by Fishnetwr1081 on 03/29/2013 09:36am

    http://sexylingerieshops.webs.com - Trashy LingerieSweep in it, dust in it, read in it Often, wholesalers, distributors or even manufacturers offer discount pricing for quantity purchases http://Lingeriesv.webs.com - red LingerieWhile lingerie is generally pretty forgiving size wise, (a lot of lingerie is marked one size fits all) you should know at a minimum if she's a small, medium or large Make sure to have the correct measurements and then go from there http://Lingeriesv.webs.com - Camouflage LingerieHowever, this is not the case today anymore Pay attention to material type (cotton, silk, etc http://sexystockings.webs.com - sexy stockingsGot a nice set of abs? Look for an outfit that reveals your mid drift The next thing that you have to consider is the design http://sexylingeriecostumese.webs.com - Sexy Nurse LingeriePrices vary as per the package and choice Something else to remember is if the store offers to wrap the lingerie let them

    Reply
  • Lace Chemise

    Posted by Fishnetdp1044 on 03/29/2013 07:17am

    http://sexystockings.webs.com - Fishnet Panty HoseAsk any woman and you will perhaps get an idea how close to the heart of a woman is lingerie Do a search on lingerie and you'll find a multitude of reputable lingerie dealers and merchants http://discountsexylingerie.webs.com - Sexy Lingerie salethe massive appreciation she will get from her sexy undies is a whole new matter Remember that the more accurate the measurement is, the more fitted and perfect the effects of the lingerie will be http://babydollnightgowns.webs.com - Babydoll lingerie  If you can purchase items from these ranges and you can’t go very wrong in getting your partner a present that she will enjoy wearing for a long time to comes sex appeal http://G-string.webs.com - Sexy ChemiseSexy lingerie is an easy way to add a sizzle into your relationship Pay attention on fabrics, quality, and selection and of course the website on its own http://sexystockings.webs.com - Fishnet BodystockingsBaby doll lingerie comes in a variety of fabrics Amongst its product inclusions are summerwear, clubwear, Halloween lane, fetish wear, men

    Reply
  • cheap ray ban sunglasses

    Posted by tgliliImpumpvec on 03/28/2013 10:19pm

    http://sunglassdicountsaleu.webs.com - cheap oakleys sunglasses fake ray ban sunglasses http://sunglassdicountsaleu.webs.com - designer sunglasses cheap cheap oakley http://discountsunglasseshoo.webs.com - discount sunglasses ray ban sunglasses cheap http://sunglasswholesaleofgucci.webs.com - oakleys for cheap cheap ray ban sunglasses http://sunglassdicountsaleu.webs.com - cheap aviator sunglasses fake ray ban

    Reply
  • oakley sunglasses cheap

    Posted by ugliliImpumpnqw on 03/28/2013 08:30pm

    http://wholesalesunglassescool.webs.com - wholesale oakley sunglasses cheap ray ban http://olesalesunglassesgood.webs.com - wholesale oakley sunglasses cheap ray ban sunglasses http://discountsunglassessale.webs.com - discount oakley sunglasses,,,,,o cheap oakley frogskins http://olesalesunglassesgood.webs.com - wholesale designer sunglasses wholesale sunglasses http://discountoakleysunglassesho.webs.com - oakley discount discount oakleys

    Reply
  • cheap oakleys

    Posted by cgliliImpumpoor on 03/28/2013 07:47pm

    http://guccisunglassescheap.webs.com - cheap ray ban discount sunglasses http://replicaguccisunglasses.webs.com - replica sunglasses wholesale oakley sunglasses http://sunglassdicountsaleu.webs.com - oakleys cheap wholesale designer sunglasses http://discountsunglassesfinewebs.com - discount sunglasses cheap ray ban http://wholesalesunglassescool.webs.com - wholesale oakley sunglasses oakley sunglasses discount

    Reply
  • Loading, Please Wait ...

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: September 17, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT Another day, another end-of-support deadline. You've heard enough about the hazards of not migrating to Windows Server 2008 or 2012. What you may not know is that there's plenty in it for you and your business, like increased automation and performance, time-saving technical features, and a lower total cost of ownership. Check out this upcoming eSeminar and join Rich Holmes, Pomeroy's practice director of virtualization, as he discusses the …

  • Live Event Date: September 16, 2014 @ 11:00 a.m. ET / 8:00 a.m. PT Are you starting an on-premise-to-cloud data migration project? Have you thought about how much space you might need for your online platform or how to handle data that might be related to users who no longer exist? If these questions or any other concerns have been plaguing you about your migration project, check out this eSeminar. Join our speakers Betsy Bilhorn, VP, Product Management at Scribe, Mike Virnig, PowerSucess Manager and Michele …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds