i can provide u linq query. but i don't know visfire.
i have implemented bar graph using fusion charts.
sample code of linq (this linq query gets daily sales details of company)
public string CreateChart()
{
string strXML;
strXML = "<graph caption='Billing Report' subCaption='By Date' decimalPrecision='2' showNames='1' pieSliceDepth='30' formatNumberScale='0'>";
var query = from i in db.InvoiceHeaders where i.BillTypeId == 1 group i by i.InvoiceDate into g select new { Date = g.Key.Value.Date, Total = g.Sum(o => o.BasicTotal) };
foreach (var p in query)
{
strXML += "<set name='" + String.Format("{0:dd/MM}", p.Date) + "' value='" + p.Total + "' />";
}
strXML += "</graph>";
return FusionCharts.RenderChart("Charts/FCF_Line.swf", "", strXML, "FactorySum", "650", "300", false, false);
}
Note: it is using fusion charts(open source) if need link for fusion chart i can provide or u can google it as fusion chart for asp.net application sample.