Chart help needed.

Hi,
is anybody here successfully using the ChartView 1.2 class? After 3 days of trying, I desperately need help :frowning:

I created a completely new project, dragged the “Chart” folder to the navigator, and then dragged a copy of the class onto my window.
I then named my ListBox etc etc.

The problem is that when I try to display any type of chart via button code - nothing happens???
The button code was working in 1.0, but it fails in 1.2?

I have contacted Jeremie Leroy the designer 2 or 3 days ago, but he only replied to my previous email regarding me purchasing another of his controls. When I asked about the Chart View control not working - I got no reply??

If anyone can help me - I have a tiny, basic example project which I could send you for review.

Hope someone can help.
Thank you all in advance.

UPDATE:
I ran the project in the debugger and the line of code below produces an OutOfBounds exception:

ChartView1.LoadFromListbox (List, True, True )

Can someone please tell me what that means?

Thank you all in advance.

Hi again,
I have now been stuck for 4 days and nights trying to get this to work - to no avail :frowning:

If nobody uses ChartView 1.2, can someone recommend another chart component for Xojo, as my app is completely finished apart from this problem.

I’m a bit disappointed that the creator of ChartView 1.2 did not even reply saying that he was not in a position to offer me help :frowning:

If someone can help - I have uploaded the tiny project file.
Click here to download
Thank you all in advance.

I’ve never used this control, but I added some data to your listbox by setting the InitialValue in the inspector.

Put the following code in the ColumnViewButton action event, the graph seems to draw just fine. I think the problem with your existing code is you weren’t adding and ChartSerie objects.

  ChartView1.Title = "YTD Totals Per Associate"
  dim s1 as new ChartSerie
  dim s2 as new ChartSerie
  ChartView1.AddSerie s1
  ChartView1.AddSerie s2
  ChartView1.LoadFromListbox(List)

Johnny - Thank you very much.
That sort of worked but I am having problems when I add other buttons to display different chart types.

I will look into it, but may need your help again :slight_smile:

THANK YOU.

Change your code in ColumnViewButton action event to:

  ChartView1.Title = "YTD Totals Per Associate"
  if ChartView1.Series.Ubound < 0 then
    dim s1 as new ChartSerie
    dim s2 as new ChartSerie
    ChartView1.AddSerie s1
    ChartView1.AddSerie s2
  end if
  ChartView1.LoadFromListbox(List)

In the StatAdd Window btn_Add action event change your code to:

  if TextField1.text<>"" and TextField2.text<>"" then
    Stats1.List.AddRow(TextField1.Text,TextField2.Text)
    self.Close
  end if

I think this will get it working the way you want it to.