Help with ChartView

Hello. I purchased ChartView a few weeks ago and am running into some issues with getting the charts to work as expected. I submitted a contact us form as well as emailed Jeremy Leroy but have since heard back. If I had read some of the posts about him being non-existent with providing customer support, I probably wouldn’t have shelled out the $200 to buy the product. In any event, I have the product and do think it has great potential and hope you can help with this.

I plan on using data from a db. The examples use a csv file. When looking at the raw data for the Billionaires csv for example, it looks like the incomes are already summed up. How would you set up the ChartView (SQL statement) if the data was in a database, and instead of the values already summed up, there was monthly income for the billionaires that needed to be summed up and then grouped by year? Also, how do you set up the x and y axes and the legend if the data is coming from a database?

In my project, I am trying to get chart to display the OrderTotals for each day over the past 7 days. There can be several orders in one day, so I’d like to have these summed up and displayed as a total for the day.

Can anyone assist?

Hi Ryan,

You can see the complete documentation in this link: http://www.jeremieleroy.com/wiki/index.php?title=ChartView

find by LoadFromListBox method… Is very easy to make work.

I use a listbox as a datasource for the chart. I define the columns I need, and set the listbox to a very small size, and set the visibility off.

Regards

Thank you Adelar. I had checked out his Wiki but there’s not a whole lot to it. That was a complaint I read on other posts too. I’ll play around with the listbox method as that seems to work better for me than the LoadFromDB

Do you know how to change the chart’s legend name? This is displaying as “1”. There does not seem to be a ChartView1.Legend.Title method

Here’s a simple example we use to populate a chartview with data from a recordset:

[code] dim rs as RecordSet=RunSQL(“select strftime(’%d’, date(queued)) as day, count(*) as requests, sum(failed) as faults from task group by queued”)

if not IsNull(rs) then
ChartView.Init(true, true, true)
ChartView.LoadFromDB(rs)
end
[/code]

queued is a date and we extract the day from it
count(*) as requests is records for each day
failed is an integer (1=true, 0=false)

This gives us 2 columns per day for requests and fails, Y-axis is the count

Hope it helps - works very well for me.

Thank you Matthew! I will try to implement something like this in my project. So far am getting it to work well with using a listbox that is populated with data from a sql statement and recordset but was hoping to not have to use a listbox since doing the whole sql/rs piece already.

Did you happen to see my recent post on how to modify the legend title with using the listbox?

Haven’t tried from listbox…i’ve only used recordset…sorry

Chart Legend is an array. You can set this way:

ChartView1.Series(0).Title = "Legend One"
ChartView1.Series(1).Title = "Legend Two"

or

ChartView1.Series(0).Title = myVariableName

Does anyone use WebChartView in Xojo Cloud ?

I’ve some drawing Issue only in Xojo Cloud…

Thanks for any Reply

Björn

Thank you Adelar! Just what I needed.

Good to Help…