Infragistics Home

Infragistics Forums

Infragistics community online discussions.
Welcome to Infragistics Forums Sign in | FAQ
in Search

Column chart error

Last post 07-03-2008 11:57 by snailpace. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 07-03-2008 10:42

    Column chart error

    When there is no data returned from the Database...the column chart throws an error.

    "Column Chart Error: You must have atleast one row and one numeric column" in bright red color

    How do I change this message to display something more customised?

    Thanks

    • Post Points: 20
  • 07-03-2008 10:49 In reply to

    Re: Column chart error

    You can try handling InvalidDataReceived Event:

    this.UltraChart1.InvalidDataReceived += new Infragistics.UltraChart.Shared.Events.ChartDataInvalidEventHandler(UltraChart1_InvalidDataReceived);

    ...

    void UltraChart1_InvalidDataReceived(object sender, Infragistics.UltraChart.Shared.Events.ChartDataInvalidEventArgs e)

    {

    e.Text =
    "Text";

    }

    Best regards,
    Teodor Taushanov
    • Post Points: 20
  • 07-03-2008 11:08 In reply to

    Re: Column chart error

    I've added this event handler..... 

    Private
    Sub ChartGenre_InvalidDataReceived(ByVal sender As Object, ByVal e As Infragistics.UltraChart.Shared.Events.ChartDataInvalidEventArgs)

    e.Text = "Data not available."

    End Sub

     but i'm not sure where to add

     this.UltraChart1.InvalidDataReceived += new Infragistics.UltraChart.Shared.Events.ChartDataInvalidEventHandler(UltraChart1_InvalidDataReceived);

    THanks

    • Post Points: 20
  • 07-03-2008 11:17 In reply to

    Re: Column chart error

    Answer

    Just add to your function Handles UltraChart1.InvalidDataReceived

    The code need to be:

    Private Sub UltraChart1_InvalidDataReceived(ByVal sender As System.Object, ByVal e As Infragistics.UltraChart.Shared.Events.ChartDataInvalidEventArgs) Handles UltraChart1.InvalidDataReceived

    e.Text = "Data not available."

    End Sub

    Best regards,
    Teodor Taushanov
    • Post Points: 35
  • 07-03-2008 11:21 In reply to

    Re: Column chart error

    Alright...great...it worked.

    Thanks

    • Post Points: 5
  • 07-03-2008 11:26 In reply to

    Re: Column chart error

    One more question....how can I change the font and color of the text?

    • Post Points: 20
  • 07-03-2008 11:35 In reply to

    Re: Column chart error

    Answer

    e.LabelStyle.FontColor = Color.Red

    e.LabelStyle.Font = New Font("Arial", 10)

    Best regards,
    Teodor Taushanov
    • Post Points: 20
  • 07-03-2008 11:57 In reply to

    Re: Column chart error

    thank u....this worked for me

    e.LabelStyle.FontColor = Drawing.Color.Black

    e.LabelStyle.FontSizeBestFit = New FontSize()

    • Post Points: 5
Page 1 of 1 (8 items)
Powered by Community Server (Commercial Edition), by Telligent Systems