Tema: canvas
Ver Mensaje Individual
  #3 (permalink)  
Antiguo 23/03/2015, 12:08
Avatar de herzbazi
herzbazi
 
Fecha de Ingreso: febrero-2012
Mensajes: 612
Antigüedad: 12 años, 2 meses
Puntos: 36
Respuesta: canvas

Cita:
Iniciado por Carlangueitor Ver Mensaje
Eso muchacho, no dice nada de tu código que usas para pintar en el canvas, no se te puede ayudar así.

saludos
muchas gracias tenes razon ,

comento un poco , mi codigo imprime graficas de pastes en donde value representa un % del circulo y color el color que tendra la seccion de la grafica ahora necesito imprimir un texto dentro , de la seccion

gracias


este es mi codigo que imprime

Código Javascript:
Ver original
  1. <script type="text/javascript">
  2.  
  3.                     jQuery(window).load( function(){
  4.  
  5.                         var radarChartData = {
  6.                             labels : ["Education","Psychology","Mentorship","Safe Home","Economic Opportunity"],
  7.                             datasets : [
  8.                                 {
  9.                                     fillColor : "rgba(220,220,220,0.5)",
  10.                                     strokeColor : "rgba(220,220,220,1)",
  11.                                     pointColor : "rgba(220,220,220,1)",
  12.                                     pointStrokeColor : "#fff",
  13.                                     data : [0,0,0,5000,4700]
  14.                                 },
  15.                                 {
  16.                                     fillColor : "rgba(151,187,205,0.5)",
  17.                                     strokeColor : "rgba(151,187,205,1)",
  18.                                     pointColor : "rgba(151,187,205,1)",
  19.                                     pointStrokeColor : "#fff",
  20.                                     data : [11540,6000,7800,5800,1500]
  21.                                 }
  22.                             ]
  23.  
  24.                         };
  25.  
  26.                         var doughnutChartData = [
  27.                             {
  28.                                 value: 32343,
  29.                                 color:"#F7464A"
  30.                             },
  31.                             {
  32.                                 value : 7600,
  33.                                 color : "#46BFBD",
  34.                                 placeholder:"hola"
  35.                             },
  36.                             {
  37.                                 value : 5000,
  38.                                 color : "#FDB45C"
  39.                             },
  40.                             {
  41.                                 value : 5000,
  42.                                 color : "#949FB1"
  43.                             },
  44.                             {
  45.                                 value : 12000,
  46.                                 color : "#4D5360"
  47.                             },
  48.                                                 {
  49.                                 value : 12000,
  50.                                 color : "#4D5360"
  51.                             }
  52.  
  53.                           ];
  54.  
  55.                         var pieChartData = [
  56.                             {
  57.                                 value: 30,
  58.                                 color:"#F38630"
  59.                             },
  60.                             {
  61.                                 value : 50,
  62.                                 color : "#E0E4CC"
  63.                             },
  64.                             {
  65.                                 value : 100,
  66.                                 color : "#69D2E7"
  67.                             },
  68.                             {
  69.                                 value : 45,
  70.                                 color : "#1E73BE"
  71.                             }
  72.  
  73.                         ];
  74.  
  75.                         var globalGraphSettings = {animation : Modernizr.canvas};
  76.  
  77.                         function showRadarChart(){
  78.                             var ctx = document.getElementById("radarChartCanvas").getContext("2d");
  79.                             new Chart(ctx).Radar(radarChartData,globalGraphSettings);
  80.                         }
  81.  
  82.                         function showDoughnutChart(){
  83.                             var ctx = document.getElementById("doughnutChartCanvas").getContext("2d");
  84.                             new Chart(ctx).Doughnut(doughnutChartData,globalGraphSettings);
  85.                         }
  86.  
  87.                         function showPieChart(){
  88.                             var ctx = document.getElementById("pieChartCanvas").getContext("2d");
  89.                             new Chart(ctx).Pie(pieChartData,globalGraphSettings);
  90.                         }
  91.  
  92.                         $('#radarChart').appear( function(){ $(this).css({ opacity: 1 }); setTimeout(showRadarChart,300); },{accX: 0, accY: -155},'easeInCubic');
  93.  
  94.                         $('#doughnutChart').appear( function(){ $(this).css({ opacity: 1 }); setTimeout(showDoughnutChart,300); },{accX: 0, accY: -155},'easeInCubic');
  95.  
  96.                         $('#pieChart').appear( function(){ $(this).css({ opacity: 1 }); setTimeout(showPieChart,300); },{accX: 0, accY: -155},'easeInCubic');
  97.  
  98.                     });
  99.  
  100.                     </script>

que que necestio es escribir un texto

{
value: 30,
color:"#F38630"
aqui quiero escribir para que cuando se dibuje la grafica se escriba tambien
},
__________________
Enseña todo lo que sepas...
Aprende todo lo que puedas..