[flexcoders] How to remove labels from a chart with ActionScript

2009-01-12 Thread Julien BALMONT
Hello,

i'm trying to remove the labels from the horizontal axis of a column chart
(and a line chart) when clicking on a button (and also add it if removed).
For this, i have to use ActionScript, but i'm unable to find the correct
syntax and Object.

Can anyone help me?

I've tried myBarChart.styleName = noAxisStyle; (with a noAxisStyle class
defined with .noAxisStyle
{
showLabels: false;
}
but it doesn't work.

I also tried myBarChart.setStyle(showLabels, true); but it diesn't work.

Finally I tried
AxisRenderer(myBarChart.horizontalAxisRenderers).setStyle(showLabels,
false); but it doesn't work.

No other idea.

Thanks!


Re: [flexcoders] How to remove labels from a chart with ActionScript

2009-01-12 Thread Julien BALMONT
You're a chief!!!
I had forgotten the [0] ;(

Thanks for your help, now it works

Julien

On Mon, Jan 12, 2009 at 4:54 PM, Sam Lai samuel@gmail.com wrote:


 AxisRenderer(myBarChart.horizontalAxisRenderers[0]).setStyle(showLabels,
 false);

 should work. How have you defined your chart in MXML? Did you
 explicitly define a horizontal axis renderer, or are you using the
 internal one? Maybe try defining one explicitly, and that way you can
 set an ID and refer to it directly.

 2009/1/12 Julien BALMONT 
 julien.balm...@echovox.comjulien.balmont%40echovox.com
 :

  Hello,
 
  i'm trying to remove the labels from the horizontal axis of a column
 chart
  (and a line chart) when clicking on a button (and also add it if
 removed).
  For this, i have to use ActionScript, but i'm unable to find the correct
  syntax and Object.
 
  Can anyone help me?
 
  I've tried myBarChart.styleName = noAxisStyle; (with a noAxisStyle
 class
  defined with .noAxisStyle
  {
  showLabels: false;
  }
  but it doesn't work.
 
  I also tried myBarChart.setStyle(showLabels, true); but it diesn't
 work.
 
  Finally I tried
  AxisRenderer(myBarChart.horizontalAxisRenderers).setStyle(showLabels,
  false); but it doesn't work.
 
  No other idea.
 
  Thanks!
 
 
 
  




-- 
Julien Balmont
Project Manager
Tel:  +331 41 92 28 73
Mobile: +336 32 65 17 60

Echovox France
107 Avenue Charles de Gaulle
92200 Neuilly-Sur-Seine
France


Re: [flexcoders] How to remove labels from a chart with ActionScript

2009-01-12 Thread Julien BALMONT
And FYI, the Axis Renderer was defined explicitly.

Thanks again

On Mon, Jan 12, 2009 at 4:57 PM, Julien BALMONT jul...@zong.com wrote:

 You're a chief!!!
 I had forgotten the [0] ;(

 Thanks for your help, now it works

 Julien


 On Mon, Jan 12, 2009 at 4:54 PM, Sam Lai samuel@gmail.com wrote:


 AxisRenderer(myBarChart.horizontalAxisRenderers[0]).setStyle(showLabels,
 false);

 should work. How have you defined your chart in MXML? Did you
 explicitly define a horizontal axis renderer, or are you using the
 internal one? Maybe try defining one explicitly, and that way you can
 set an ID and refer to it directly.

 2009/1/12 Julien BALMONT 
 julien.balm...@echovox.comjulien.balmont%40echovox.com
 :

  Hello,
 
  i'm trying to remove the labels from the horizontal axis of a column
 chart
  (and a line chart) when clicking on a button (and also add it if
 removed).
  For this, i have to use ActionScript, but i'm unable to find the correct
  syntax and Object.
 
  Can anyone help me?
 
  I've tried myBarChart.styleName = noAxisStyle; (with a noAxisStyle
 class
  defined with .noAxisStyle
  {
  showLabels: false;
  }
  but it doesn't work.
 
  I also tried myBarChart.setStyle(showLabels, true); but it diesn't
 work.
 
  Finally I tried
  AxisRenderer(myBarChart.horizontalAxisRenderers).setStyle(showLabels,
  false); but it doesn't work.
 
  No other idea.
 
  Thanks!
 
 
 
  




 --
 Julien Balmont
 Project Manager
 Tel:  +331 41 92 28 73
 Mobile: +336 32 65 17 60

 Echovox France
 107 Avenue Charles de Gaulle
 92200 Neuilly-Sur-Seine
 France




-- 
Julien Balmont
Project Manager
Tel:  +331 41 92 28 73
Mobile: +336 32 65 17 60

Echovox France
107 Avenue Charles de Gaulle
92200 Neuilly-Sur-Seine
France


Re: [flexcoders] Re: Flex 3 Charts - Issue with Horizontal Axis

2009-01-08 Thread Julien BALMONT
Hi, thanks for your answer.

In fact, in the meantime, I've found a new way to do it.

Each time the timer launches the process, I add to the dataSet the value and
the date as a String.
--  In the addData function:
dataSet.addItem( { xValue : xValue , nb: nb } );
xDate = new Date();
xValue =
String(xDate.getHours()+:+xDate.getMinutes()+:+xDate.getSeconds());

--The new mx:LineChart
mx:LineChart width=100% height=100%
dataProvider={dataSet}
mx:series
mx:LineSeries xField=xValue yField=nb
showDataEffect={interp} /
/mx:series
mx:horizontalAxis
mx:CategoryAxis categoryField=xValue id=xAxe/
/mx:horizontalAxis
mx:horizontalAxisRenderers
   mx:AxisRenderer labelRotation=45 axis={xAxe}/
/mx:horizontalAxisRenderers

/mx:LineChart

Thanks for your help

So now, it works.



On Thu, Jan 8, 2009 at 5:34 PM, Amy amyblankens...@bellsouth.net wrote:

   --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 nerique julien.balm...@... wrote:
 
 
  Hi,
 
  i'm recent to Flex 3, so maybe my question is easy to answer, or
 not, I
  don't know :)
 
  I'm making a Real Time chart y using a Timer, and an HTTP Service.
 (Please
  find attached a cleaned copy of my mxml:
  http://www.nabble.com/file/p21349576/sample.mxml sample.mxml )
 
  Every 500 milliseconds, the Timer calls the HTTPService, which
 calls a PHP
  distant file, which sends a value. This value is added to the Chart
 using
  the addData function.
 
  My issue is the following: I'd like the Horizontal axis, to add a
 label
  every minute (for example the chart is launched at 08:30, it shows
 first
  08:30, then 1 minute later, it adds 08:31 etc...) but I can't
 figure out how
  to do this. I've tried to use a DateTimeAxis solution, but it
 doesn't seem
  to be automatic.
 
  Could you help?
 
  Thanks!!!

 Have you tried changing the maximum property on the DateTimeAxis
 every minute?

  




-- 
Julien Balmont
Project Manager
Tel:  +331 41 92 28 73
Mobile: +336 32 65 17 60

Echovox France
107 Avenue Charles de Gaulle
92200 Neuilly-Sur-Seine
France