Welcome Guest Search | Active Topics |

Changing the color of the first column of the same series?
GuttoSP
#1 Posted : Thursday, August 2, 2012 10:42:43 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/1/2012(UTC)
Posts: 4

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
Changing the color of the first column of the same series?

Dragan
#2 Posted : Thursday, August 2, 2012 11:02:55 AM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
Hi,

Can you provide us a little more info?

How are you changing the color of the first series? If you can send us your code it will be great.
Best Regards,
Dragan Matek
jqChart Inc.
GuttoSP
#3 Posted : Thursday, August 2, 2012 11:26:42 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/1/2012(UTC)
Posts: 4

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
Code:

$(document).ready(function () {
     $('#usageResources').jqChart({
          width : '100%',
          height: '250px',
          border: {
               strokeStyle: 'red', // border line color
               lineWidth: 0, // border line width
               lineCap: 'butt', // butt | round | square
               lineJoin: 'miter', // round | bevel | miter
               miterLimit: 0,
               cornerRadius: 0, // border corner radius
               padding: 10 // border padding
          },
          axes: [{
               type: 'linear',
               location: 'left',
               minimum: 0,
               maximum: 100,
               interval: 10
          }],
          legend:
          {
               location: 'bottom',                    
               customItems: [{
                    text: 'Memória',
                    marker: { /*visible: false,*/ fillStyle: 'green' }
               },
               {
                    text: { text: 'Processador'/*, fillStyle: 'blue'*/ },
                    marker: { fillStyle: 'blue' }
               }]
           },
          series: [{
               title: 'kkk',
               type: 'column',
               data: [['Memoria', Math.floor((Math.random() * (100-1+1))+1)], ['Processador', Math.floor((Math.random() * (100-1+1))+1)]]
          }]
     });
            
     chart1Update();
            
});
            
     function chart1Update()
     {
          // get current series
          var series_ = $('#usageResources').jqChart('option', 'series');
               
          // get the data from the first series
          var data_ = series_[0].data;

          data_[1] = Math.floor((Math.random() * (100-0+1))+0);       
          data_[0] = Math.floor((Math.random() * (100-0+1))+0);

          // update (redraw) the chart
          $('#usageResources').jqChart('update');
          setTimeout( 'chart1Update()', 3000 );
     }


Code:
<div id="usageResources"></div>


I want to change the color of the first column to identify according to the legend.

A column (the first) represents the memory, and should be green, as in the legend.

The second column represents the processor, and can go blue, as it is.

I'm using a single number to represent the two values​​, because the layout is better. If it comes to use two series, the columns would be glued to each other, and thus is not good.

Or change the color of the column of the same series, or able to separate the columns of different series.
Dragan
#4 Posted : Thursday, August 2, 2012 12:02:12 PM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
Thanks for the additional info.

We're going to add functionality, so the jqChart will support your requirement with easy. I'll send you updated version via email after that.

I believe we'll be ready tomorrow with this.
Best Regards,
Dragan Matek
jqChart Inc.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

FlatEarth Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.088 seconds.