Page 1 of 1

GAUGES

Posted: Wed May 17, 2006 8:22 pm
by 6927799
Hi Hermes,

For now I can't tell you if it will be implemented and when. I've added it to our wish-list to be considered for inclusion in future releases.

In the meantime, you may implement your custom gauge series derived from existing gauge series. Custom drawing on TeeChart's canvas may also help you in some of your needs.
I need at least a gauge with 1 scale, 2 neddles and 5 annulars, can you give me an example of how to do it (C#) ?

NOTE: I have not the teechart code

Thank you

Posted: Wed May 17, 2006 8:23 pm
by 6927799
I need it to web forms.

Posted: Thu May 18, 2006 10:25 am
by narcis
Hi Hermes,

You should implement your own gauges by inheriting from Steema.TeeChart.Styles.Circular and doing something like the code below overriding and implementing the methods necessary to draw the kind of gauges you want.

Code: Select all

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Steema.TeeChart;
using Steema.TeeChart.Styles;
using Steema.TeeChart.Drawing;

public partial class Default3 : System.Web.UI.Page
{
  protected void Page_Load(object sender, EventArgs e)
  {
    Chart ch1 = WebChart1.Chart;

    MyGauges gauge1 = new MyGauges(ch1);
    gauge1.FillSampleValues();    
  }
}

public class MyGauges : Circular
{
  private Graphics3D g;

  public MyGauges() : this(null) {}
  public MyGauges(Steema.TeeChart.Chart c) : base(c) 
  {
   g = c.Graphics3D;
  }

  protected override void Draw()
  {
    base.Draw();
  }

  public override void DrawValue(int index)
  {
    base.DrawValue(index);
  }
}
Another option would be purchasing TeeChart for .NET v2 code and modify existing gauges.

Posted: Fri May 19, 2006 2:28 pm
by 6927799
How to add a needle, annular?
What kind of properties can I set to them?

Thank you

Posted: Mon May 22, 2006 10:45 am
by narcis
Hi Hermes,

You should custom draw them in Draw or DrawValues methods. Also notice that TeeChart assemblies are not obfuscated so you may use Reflector to see how gauges series are implemented.