hello Choan,

thanks for help !
in php,
<div id=mpngicnt>80,30,50</div>
in js
var valueArray = $.trim($('#mpngicnt').text()).split(',');
------
after that, valueArray return   80 30 50
------
still can't pass the array into gchart....
series: [ $.gchart.series(valueArray, 'red')]

please comment !


On 11月5日, 午後9:52, Choan Gálvez <[EMAIL PROTECTED]> wrote:
> On Nov 5, 2008, at 5:59 AM, moscorp wrote:
>
>
>
> > gchart can't recognize series data in barVert...
>
> > can't work in
> > var valueArray = $('#mpngicnt').text(); //80,30,50
> > series: [ $.gchart.series([ valueArray ], 'red')],
>
> > but it works in
> > series: [ $.gchart.series([ 80,30,50 ], 'red')],
>
> > how can i solve it !
>
> `$('selector').text()` returns a string. From what I read in your  
> working code, you need to pass anarray.
>
>      var valueArray = $.trim($('#mpngicnt').text()).split(','); //  
> [ 80, 30, 50 ]
>      // I assume there is some code in the middle
>      series: [ $.gchart.series(valueArray, 'red')]
>
> Now, back to jQuery related posts.
> --
> Choan

Reply via email to