espressoitalia Report post Posted July 4, 2008 Hi guys, I post my code to do a charth combination 3d line: Dim arrData(1,5), arrDataQuantity(1,4) arrData(0,1) = MonthName(MeseAttuale) arrData(0,2) = TotalRevenueOpen arrData(0,3) = TotalRevenueWon arrData(0,4) = TotalRevenueLost arrData(0,5) = TotalRevenueAbandon arrDataQuantity(0,1) = TotalRevenueOpenQuantity arrDataQuantity(0,2) = TotalRevenueWonQuantity arrDataQuantity(0,3) = TotalRevenueLostQuantity arrDataQuantity(0,4) = TotalRevenueAbandonQuantity Dim strXML, strCategories, strTargetOpen, strOpen, strTagetWon, strWon, strLost, strAbandon, strOpenQuantity, strWonQuantity, strLostQuantity, strAbandonQuantity, i strXML = "<chart caption='Sales by Month' xAxisName='"&strCategories&"' showLegend ='0' formatNumberScale='6' rotateValues='1' placeValuesInside='1' decimals='0' showValues='0' numberPrefix='$' imageSave='1' imageSaveURL='/NewSite/FusionWidgets/ImageSaving/FusionChartsSave.aspx' labeldisplay='STAGGER' seriesNameInToolTip='0' plotSpacePercent='0'>" strCategories = "<categories>" strOpen = "<dataset seriesName='Tot' renderAs='COLUMN' parentYAxis='P' drawAnchors='1'>" strWon = "<dataset seriesName='Tot' renderAs='COLUMN' parentYAxis='P' drawAnchors='1'>" strLost = "<dataset seriesName='Tot' renderAs='COLUMN' parentYAxis='P' drawAnchors='1'>" strAbandon = "<dataset seriesName='Tot' renderAs='COLUMN' parentYAxis='P' drawAnchors='1'>" strOpenQuantity = "<dataset seriesName='Qty' renderAs='Line' parentYAxis='S' drawAnchors='1'>" strWonQuantity = "<dataset seriesName='Qty' renderAs='Line' parentYAxis='S' drawAnchors='1'>" strLostQuantity = "<dataset seriesName='Qty' renderAs='Line' parentYAxis='S' drawAnchors='1'>" strAbandonQuantity = "<dataset seriesName='Qty' renderAs='Line' parentYAxis='S' drawAnchors='1'>" For i=0 to UBound(arrData)-1 strCategories = strCategories & "<category name='" & arrData(i,1) & "' />" strOpen = strOpen & "<set toolText='Total Proposal' showValue='1' value='" & arrData(i,2) & "' />" strWon = strWon & "<set toolText='Won' showValue='1' value='" & arrData(i,3) & "' />" strLost = strLost & "<set toolText='Lost' showValue='1' value='" & arrData(i,4) & "' />" strAbandon = strAbandon & "<set toolText='Abandon' showValue='1' value='" & arrData(i,5) & "' />" strOpenQuantity = strOpenQuantity & "<set toolText='Total Proposal' showValue='1' value='" & arrDataQuantity(i,1) & "' />" strWonQuantity = strWonQuantity & "<set toolText='Won' showValue='1' value='" & arrDataQuantity(i,2) & "' />" strLostQuantity = strLostQuantity & "<set toolText='Lost' showValue='1' value='" & arrDataQuantity(i,3) & "' />" strAbandonQuantity = strAbandonQuantity & "<set toolText='Abandon' showValue='1' value='" & arrDataQuantity(i,4) & "'/>" Next strCategories = strCategories & "</categories>" strOpen = strOpen & "</dataset>" strWon = strWon & "</dataset>" strLost = strLost & "</dataset>" strAbandon = strAbandon & "</dataset>" strOpenQuantity = strOpenQuantity & "</dataset>" strWonQuantity = strWonQuantity & "</dataset>" strLostQuantity = strLostQuantity & "</dataset>" strAbandonQuantity = strAbandonQuantity & "</dataset>" strTagetWon = "<trendlines>" strTagetWon =strTagetWon & "<line startValue='" & SalesWonValue & "' color='FF0000' displayValue='Sales Target $" & SalesWonValue & "' showOnTop='0' thickness='1' isTrendZone='0' valueOnRight='1' />" strTagetWon = strTagetWon & "</trendlines>" strXML = strXML &"<styles>" strXML = strXML & "<definition>" strXML = strXML & "<style name='CanvasAnim' type='animation' param='_xScale' start='0' duration='1' />" strXML = strXML &"</definition>" strXML = strXML & "<application>" strXML = strXML & "<apply toObject='Canvas' styles='CanvasAnim' />" strXML = strXML & "</application>" strXML = strXML &"</styles>" strXML = strXML & strCategories & strOpen & strTagetWon & strWon & strLost & strAbandon& strOpenQuantity & strWonQuantity & strLostQuantity & strAbandonQuantity &"</chart>" Call renderChart("/NewSite/FusionCharts/MSColumn3DLineDY.swf", "", strXML, "productSales", 400, 300, false, false) My problem is join the same color.... The Columns area ok but the line dosen't work, I can see in the graph only the value but non in the right position, how can I anchor togheter two dataset? Have a good day! Share this post Link to post Share on other sites
Arindam Report post Posted July 4, 2008 Please provide us XML output with data. Share this post Link to post Share on other sites
espressoitalia Report post Posted July 6, 2008 Hi thanks for your answer , this is my output xml data: <HTML> <HEAD> <TITLE> Sales per month quantity </TITLE> <SCRIPT LANGUAGE="Javascript" SRC="/NewSite/FusionCharts/Includes/FusionCharts.js"></SCRIPT> <style type="text/css"> <!-- body { font-family: Arial, Helvetica, sans-serif; font-size: 12px; } --> </style> </HEAD> <BODY> <CENTER> <!-- START Script Block for Chart productSales --> <div id='productSalesDiv' align='center'> Chart. </div> <script type="text/javascript"> //Instantiate the Chart var chart_productSales = new FusionCharts("/NewSite/FusionCharts/MSColumn3DLineDY.swf", "productSales", "400", "300", "0", "0"); //Provide entire XML data using dataXML method chart_productSales.setDataXML("<chart caption='Sales by Month' xAxisName='' showLegend ='0' formatNumberScale='6' rotateValues='1' placeValuesInside='1' decimals='0' showValues='0' numberPrefix='$' imageSave='1' imageSaveURL='/NewSite/FusionWidgets/ImageSaving/FusionChartsSave.aspx' labeldisplay='STAGGER' seriesNameInToolTip='0' plotSpacePercent='0'><styles><definition><style name='CanvasAnim' type='animation' param='_xScale' start='0' duration='1' /></definition><application><apply toObject='Canvas' styles='CanvasAnim' /></application></styles><categories><category name='July' /></categories><dataset seriesName='Tot' renderAs='COLUMN' parentYAxis='P' drawAnchors='1'><set toolText='Total Proposal' showValue='1' value='30317.62' /></dataset><trendlines><line startValue='10000' color='FF0000' displayValue='Sales Target $10000' showOnTop='0' thickness='1' isTrendZone='0' valueOnRight='1' /></trendlines><dataset seriesName='Tot' renderAs='COLUMN' parentYAxis='P' drawAnchors='1'><set toolText='Won' showValue='1' value='5451.72' /></dataset><dataset seriesName='Tot' renderAs='COLUMN' parentYAxis='P' drawAnchors='1'><set toolText='Lost' showValue='1' value='3364' /></dataset><dataset seriesName='Tot' renderAs='COLUMN' parentYAxis='P' drawAnchors='1'><set toolText='Abandon' showValue='1' value='6681' /></dataset><dataset seriesName='Qty' renderAs='Line' parentYAxis='S' drawAnchors='1'><set toolText='Total Proposal' showValue='1' value='5' /></dataset><dataset seriesName='Qty' renderAs='Line' parentYAxis='S' drawAnchors='1'><set toolText='Won' showValue='1' value='1' /></dataset><dataset seriesName='Qty' renderAs='Line' parentYAxis='S' drawAnchors='1'><set toolText='Lost' showValue='1' value='1' /></dataset><dataset seriesName='Qty' renderAs='Line' parentYAxis='S' drawAnchors='1'><set toolText='Abandon' showValue='1' value='1'/></dataset></chart>"); //Finally, render the chart. chart_productSales.render("productSalesDiv"); </script> <!-- END Script Block for Chart productSales --> </CENTER> </BODY> </HTML> have a good day! Share this post Link to post Share on other sites
Arindam Report post Posted July 7, 2008 Hi After seeing your xml data, we think you want your chart looking like this way. Please test this xml, if it Share this post Link to post Share on other sites