Jump to content

SUBIECTE NOI
« 1 / 5 »
RSS
Presiune apa fluctuanta pompa sub...

Revizie auto la Bucuresti

identificare component defect

Recomandare tableta
 Ansamblul Neofort Rezidenția...

Caderea in apostazie a Bisericii ...

Inselatoria secolului!

Problema soft samsung galaxy watc...
 Recomandare tastatura compatibila...

Sfat legat de achizitonarea unui ...

Festivalul de Film Cannes 2024

Scaun auto
 La mulți ani @ranit6996!

La mulți ani @Ciubex!

Reparat difuzor membrana hartie, ...

Restaurantele cu stele Michelin
 

Grafice simple cu JS !

- - - - -
  • Please log in to reply
No replies to this topic

#1
Courage

Courage

    Founder

  • Grup: Senior Members
  • Posts: 21,703
  • Înscris: 26.11.2001
' } output+='
Sunt doua varinante. Codul trebuie introdus dupa tag-ul <body>

Varianta 1: - valorile trebuie introduse in valori absolute, ex: 60

What is your favorite news site?

<script language="javascript1.2">

var graphimage="poll.gif"

//DEFINE GRAPH VALUES [Item name, absolute value]
var graphx=new Array()
graphx[0]=["CNN",60]
graphx[1]=["MSNBC",75]
graphx[2]=["ABC News",24]
graphx[3]=["BBC News",52]

//YOU CAN DEFINE MULTIPLE GRAPHS, eg:
//var graphy=new Array()


function graphit(g,gwidth){
total=0
for (i=0;i
'+calpercentage+'%
' document.write(output+' Total participants: [b]'+total+'[/b]') } //CALL GRAPHIT FUNCTION //graphit(NAME OF GRAPH ARRAY, MAXIMUM WIDTH IN PIXELS) graphit(graphx,200) </script>
Varianta 2: - valorile trebuie introduse in procente, ex: 36%

What is your favorite news site?

<script language="javascript1.2">

//javascript Graph-it! (Percentage)- by javascriptkit.com
//Visit javascript Kit ([url="http://javascriptkit.com"]http://javascriptkit...iptkit.com[/url]) for script
//Credit must stay intact for use

var graphimageP="poll.gif"

//DEFINE GRAPH VALUES [Item name, Percentage value]
var graphv=new Array()
graphv[0]=["CNN","28%"]
graphv[1]=["MSNBC","36%"]
graphv[2]=["ABC News","11%"]
graphv[3]=["BBC News","25%"]

//YOU CAN DEFINE MULTIPLE GRAPHS, eg:
//var graphz=new Array()


function graphitP(g,gwidth){

outputP=''
for (i=0;i'
}
outputP+='
'+g[i][1]+'
' document.write(outputP) } //CALL GRAPHIT FUNCTION //graphitP(NAME OF GRAPH ARRAY, MAXIMUM WIDTH IN PIXELS) graphitP(graphv,200) </script>
P.S. - aveti nevoie de imaginea atasata

Attached Files

  • Attached File  poll.gif   45bytes   5 downloads


Anunturi

Bun venit pe Forumul Softpedia!

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Forumul Softpedia foloseste "cookies" pentru a imbunatati experienta utilizatorilor Accept
Pentru detalii si optiuni legate de cookies si datele personale, consultati Politica de utilizare cookies si Politica de confidentialitate