From: Chuan on 5 Dec 2009 00:16 Now open any HTML file and add the following code. First we need to add a reference to Visifire2.js file inside the Head section of the HTML file. <head runat="server"> <script type="text/javascript" src="Visifire2.js"></script> </head> Then inside the body, create different Chart XAML's inside a Script tag. <script type="text/javascript"> var chartXaml1 = '<vc:Chart xmlns:vc="clr-namespace:Visifire.Charts;assembly=SLVisifire.Charts" Width="500" Height="300" Theme="Theme1">' + ' <vc:Chart.Titles>' + ' <vc:Title Text="Visifire Chart 1"/>' + ' </vc:Chart.Titles>' + ' <vc:Chart.Series>' + ' <vc:DataSeries RenderAs="Column">' + ' <vc:DataSeries.DataPoints>' + ' <vc:DataPoint AxisXLabel="Jan" YValue="35"/>' + ' <vc:DataPoint AxisXLabel="Feb" YValue="32"/>' + ' <vc:DataPoint AxisXLabel="Mar" YValue="27"/>' + ' <vc:DataPoint AxisXLabel="Apr" YValue="17"/>' + ' <vc:DataPoint AxisXLabel="May" YValue="16"/>' + ' </vc:DataSeries.DataPoints>' + ' </vc:DataSeries>' + ' </vc:Chart.Series>' + ' </vc:Chart>'; var chartXaml2 = '<vc:Chart xmlns:vc="clr-namespace:Visifire.Charts;assembly=SLVisifire.Charts" Width="500" Height="300" Theme="Theme1">' + ' <vc:Chart.Titles>' + ' <vc:Title Text="Visifire Chart 2"/>' + ' </vc:Chart.Titles>' + ' <vc:Chart.Series>' + ' <vc:DataSeries RenderAs="Column">' + ' <vc:DataSeries.DataPoints>' + ' <vc:DataPoint AxisXLabel="Jan" YValue="25"/>' + ' <vc:DataPoint AxisXLabel="Feb" YValue="42"/>' + ' <vc:DataPoint AxisXLabel="Mar" YValue="18"/>' + ' <vc:DataPoint AxisXLabel="Apr" YValue="37"/>' + ' <vc:DataPoint AxisXLabel="May" YValue="40"/>' + ' </vc:DataSeries.DataPoints>' + ' </vc:DataSeries>' + ' </vc:Chart.Series>' + ' </vc:Chart>'; var chartXaml3 = '<vc:Chart xmlns:vc="clr-namespace:Visifire.Charts;assembly=SLVisifire.Charts" Width="500" Height="300" Theme="Theme1">' + ' <vc:Chart.Titles>' + ' <vc:Title Text="Visifire Chart 3"/>' + ' </vc:Chart.Titles>' + ' <vc:Chart.Series>' + ' <vc:DataSeries RenderAs="Column">' + ' <vc:DataSeries.DataPoints>' + ' <vc:DataPoint AxisXLabel="Jan" YValue="33"/>' + ' <vc:DataPoint AxisXLabel="Feb" YValue="12"/>' + ' <vc:DataPoint AxisXLabel="Mar" YValue="28"/>' + ' <vc:DataPoint AxisXLabel="Apr" YValue="57"/>' + ' <vc:DataPoint AxisXLabel="May" YValue="30"/>' + ' </vc:DataSeries.DataPoints>' + ' </vc:DataSeries>' + ' </vc:Chart.Series>' + ' </vc:Chart>'; </script> Then inside the body, create multiple div elements and add the JavaScript code which renders the Chart inside each div element. <div id="VisifireChart0"> <script type="text/javascript"> // Create Visifire object var vChart1 = new Visifire2('SL.Visifire.Charts.xap', "MyChart1", 500, 300); // Set Chart XAML as string vChart1.setDataXml(chartXaml1); // Render chart vChart1.render("VisifireChart0"); </script> </div> <div id="VisifireChart1"> <script type="text/javascript"> // Create Visifire object var vChart2 = new Visifire2('SL.Visifire.Charts.xap', "MyChart2", 500, 300); // Set Chart XAML as string vChart2.setDataXml(chartXaml2); // Render chart vChart2.render("VisifireChart1"); </script> </div> <div id="VisifireChart2"> <script type="text/javascript"> // Create Visifire object var vChart3 = new Visifire2('SL.Visifire.Charts.xap', "MyChart3", 500, 300); // Set Chart XAML as string vChart3.setDataXml(chartXaml3); // Render chart vChart3.render("VisifireChart2"); </script> </div> smorgs8 wrote: How do I print multiple charts on one page? 16-Sep-07 I have got all of my graphs in different sheets, but I cannot figure out how to print 2 per page. Is there any possible way to do this?! Previous Posts In This Thread: On Sunday, September 16, 2007 10:54 PM smorgs8 wrote: How do I print multiple charts on one page? I have got all of my graphs in different sheets, but I cannot figure out how to print 2 per page. Is there any possible way to do this?! On Monday, September 17, 2007 9:53 AM Jon Peltier wrote: Embed the charts onto a single worksheet. Embed the charts onto a single worksheet. If the charts are on separate chart sheets (no underlying cells), right click the chart and select Location, and choose the target sheet from the As Object In dropdown. If the charts are embedded on different worksheets, copy each and paste it onto a single worksheet. Finally, print out the worksheet with all of the charts. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "smorgs87" <smorgs87(a)discussions.microsoft.com> wrote in message news:FB8E603F-DDD8-4AA0-ABAF-1AFBBE98EE51(a)microsoft.com... Submitted via EggHeadCafe - Software Developer Portal of Choice Secure Session State Transfer: ASP to ASP.NET http://www.eggheadcafe.com/tutorials/aspnet/19f8d04a-6bce-4ee0-8d6e-1ef18cbb92e1/secure-session-state-tran.aspx
|
Pages: 1 Prev: Why does X axis become another data series? Next: standard deviation |