如何使用linq作为编码语言在visifire中制作条形图 [英] How to do a bar graph in visifire using linq as coding language

查看:62
本文介绍了如何使用linq作为编码语言在visifire中制作条形图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我是linq编码的新手,我必须使用linq作为编码语言在visifire中制作条形图.
我的问题是,我必须显示本月政策的佣金图表..MTD...当前月份的周应显示在X轴上.

没有人知道如何执行此操作..
我已经做了一年又一个月..但一个月中的一个星期都无法做..
请帮助..

Hi everyone,

I am new to linq coding and i have to do a bar graph in visifire using linq as coding language.
My question is i have to show the graph of commission for policies of this month..means MTD... current months week should be shown on the X-axis..

Do anybody have any idea how to do this..
i Have done this for year and month.. but unable to do for week of a month..
Pls help ..

推荐答案

我可以提供linq查询.但我不知道visfire.
我已经使用融合图实现了条形图.

linq的示例代码(此linq查询获取公司的日常销售详细信息)

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);
    }



注意:如果需要我可以提供的融合图链接,或者您可以将其用作asp.net应用程序示例的融合图,则使用融合图(开放源代码).



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.


这篇关于如何使用linq作为编码语言在visifire中制作条形图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆