Hi,

https://developers.google.com/chart/interactive/docs/gallery/barchart

*Thanks & Regards*

*K. Ponni*



On Mon, Aug 13, 2018 at 10:23 AM, Ponni Mano <ponnimc...@gmail.com> wrote:

> hi,
>
> Can U try this
>
> <html>
>   <head>
>     <script type="text/javascript" 
> src="https://www.gstatic.com/charts/loader.js";></script>
>     <script type="text/javascript">
>       google.charts.load('current', {'packages':['bar']});
>       google.charts.setOnLoadCallback(drawStuff);
>
>       function drawStuff() {
>         var data = new google.visualization.arrayToDataTable([
>           ['Nombre', 'campo1', 'campo2'],
>
>           ['Campo1 / Campo2', 50000, 20000]
>
>           /*['Enviados / Devueltos', 8000,7000],
>           ['Enviados / Reenviados', 5600,3200],
>           ['Enviados / Alcanzados', 4500,2600],
>           ['Enviados / Devueltos', 1500,2500],*/
>         ]);
>
>         var options = {
>           width: 700,
>           height: 400,bar: {groupWidth: "95%"},          chart: {
>
>             title: 'Estado de las campañas',
>             subtitle: 'Estado de la campaña: '
>           },
>           bars: 'horizontal', // Required for Material Bar Charts.
>           series: {
>             0: { axis: 'brightness' }, // Bind series 0 to an axis named 
> 'distance'. cambiado bright por brightness
>             1: { axis: 'brightness' } // Bind series 1 to an axis named 
> 'brightness'.
>           },
>           axes: {
>             x: {
>               distance: {label: 'parsecs'}, // Bottom x-axis.
>               brightness: {side: 'top', label: 'Estado de las campañas'} // 
> Top x-axis.
>             }
>           }
>
>         };
>
>       var chart = new 
> google.charts.Bar(document.getElementById('dual_x_div'));
>       chart.draw(data, options);
>     };
>     </script>
>   </head>
>   <body>
>     <div id="dual_x_div"></div>
>   </body>
> </html>
>
>
>
> *Thanks & Regards*
>
> *K. Ponni*
>
>
>
> On Thu, Aug 9, 2018 at 7:03 PM, Luis Serrano <serrano...@gmail.com> wrote:
>
>> Hello Community, im new on google charts and may be my question will be
>> really dumb. But here it is:
>>
>> I have this code:
>>
>>
>> <html>
>>   <head>
>>     <script type="text/javascript" 
>> src="https://www.gstatic.com/charts/loader.js";></script>
>>     <script type="text/javascript">
>>       google.charts.load('current', {'packages':['bar']});
>>       google.charts.setOnLoadCallback(drawStuff);
>>
>>       function drawStuff() {
>>         var data = new google.visualization.arrayToDataTable([
>>           ['Nombre', 'campo1', 'campo2'],
>>
>>           ['Campo1 / Campo2', 50000, 20000]
>>
>>           /*['Enviados / Devueltos', 8000,7000],
>>           ['Enviados / Reenviados', 5600,3200],
>>           ['Enviados / Alcanzados', 4500,2600],
>>           ['Enviados / Devueltos', 1500,2500],*/
>>         ]);
>>
>>         var options = {
>>           width: 700,
>>           height: 400,
>>           chart: {
>>             title: 'Estado de las campañas',
>>             subtitle: 'Estado de la campaña: '
>>           },
>>           bars: 'horizontal', // Required for Material Bar Charts.
>>           series: {
>>             0: { axis: 'brightness' }, // Bind series 0 to an axis named 
>> 'distance'. cambiado bright por brightness
>>             1: { axis: 'brightness' } // Bind series 1 to an axis named 
>> 'brightness'.
>>           },
>>           axes: {
>>             x: {
>>               distance: {label: 'parsecs'}, // Bottom x-axis.
>>               brightness: {side: 'top', label: 'Estado de las campañas'} // 
>> Top x-axis.
>>             }
>>           }
>>
>>         };
>>
>>       var chart = new 
>> google.charts.Bar(document.getElementById('dual_x_div'));
>>       chart.draw(data, options);
>>     };
>>     </script>
>>   </head>
>>   <body>
>>     <div id="dual_x_div"></div>
>>   </body>
>> </html>
>>
>>
>>
>>
>> And all that i want is redice the width of the bars, if i add more data the 
>> width will be small, but i want an smaller bar with only 2 bars.
>>
>> Any help will be aprreciated.
>>
>> PD: Sorry for my apprentice
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google Visualization API" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to google-visualization-api+unsubscr...@googlegroups.com.
>> To post to this group, send email to google-visualization-api@googl
>> egroups.com.
>> Visit this group at https://groups.google.com/grou
>> p/google-visualization-api.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/google-visualization-api/e1b5f455-78a3-4b37-86f3-1831cf
>> c42703%40googlegroups.com
>> <https://groups.google.com/d/msgid/google-visualization-api/e1b5f455-78a3-4b37-86f3-1831cfc42703%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/CAKdjpwhsM_a%2BV6T-vGbe4DmtMez3SYzN_aXvqNLsu88RHmPeTg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to