How To Draw Bar Chart Animation in C Or C++ (Computer Graphics)

  PROJECT BY

(SIMPLIFY LEARN PROGRAMMING)

ON

BAR CHART ANIMATION


SOURCE CODE:


#include <graphics.h>

#include <conio.h>

int main()

{

   int gd = DETECT, gm;

 

   initgraph(&gd, &gm, "C:\\TC\\BGI");

 

   setcolor(YELLOW);

   rectangle(0,30,639,450);

   settextstyle(SANS_SERIF_FONT,HORIZ_DIR,2);

   setcolor(WHITE);

   outtextxy(275,0,"Bar Chart");

 

   setlinestyle(SOLID_LINE,0,2);

 

   line(100,420,100,60);

   line(100,420,600,420);

   line(90,70,100,60);

   line(110,70,100,60);

   line(590,410,600,420);

   line(590,430,600,420);

 

   outtextxy(95,35,"Y");

   outtextxy(610,405,"X");

   outtextxy(85,415,"O");

 

   setfillstyle(LINE_FILL,BLUE);

   bar(150,100,200,419);

outtextxy(160,419,"MI");

 

   setfillstyle(XHATCH_FILL,YELLOW);

   bar(225,150,275,419);

outtextxy(235,419,"CSK");

   setfillstyle(WIDE_DOT_FILL,LIGHTBLUE);

   bar(300,200,350,419);

outtextxy(310,419,"DC");

 

   setfillstyle(INTERLEAVE_FILL,RED);

   bar(375,125,425,419);

outtextxy(385,419,"RCB");

   setfillstyle(HATCH_FILL,LIGHTRED);

   bar(450,175,500,419);

outtextxy(460,419,"KXIP");

   getch();

   return 0;

}


OUTPUT:



Comments

Popular posts from this blog

How To Draw Scenery Animation in C or C++ (Computer Graphics)

How To Draw a Butterfly Animation in C (Computer Graphics)

How To Create Flying Kite Animation in C Or C++ (Computer Graphics)