Jump to content
Software FX Community

juanZ

Members
  • Posts

    141
  • Joined

  • Last visited

juanZ's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Im glad the product worked. If you have any question, just write us back, Best Regards,
  2. Hi, please check and test this code. Let me know if this helped. public partial class Form1 : Form { private MemoryStream chartStream; public Form1() { InitializeComponent(); } /// <summary> /// Export Chart to a desired DPI resolution. /// </summary> /// <param name="dpi"></param> private void ChartToStream(int dpi) { // where the chart will be saved. chartStream = new MemoryStream(); // GDI Container for the chart. Rectangle r = new Rectangle(0, 0, (chart1.Width * dpi) / 96, (chart1.Height * dpi) / 96); // 96 is the screen resolution Bitmap bmp = new Bitmap(r.Width, r.Height); // Set resolution and initialize graphics object. bmp.SetResolution(dpi, dpi); Graphics g = Graphics.FromImage(bmp); chart1.Paint(g, r, PaintStyles.Background | PaintStyles.Border | PaintStyles.Print); bmp.Save(chartStream, ImageFormat.Jpeg); // Can also use PNG // Release resouces. g.Dispose(); bmp.Dispose(); } private void button1_Click(object sender, EventArgs e) { ChartToStream(96); //96 DPI PrintDocument pd = new PrintDocument(); pd.PrintPage += new PrintPageEventHandler(pd_PrintPage); pd.Print(); } void pd_PrintPage(object sender, PrintPageEventArgs e) { // Include generated image. e.Graphics.DrawImage(Image.FromStream(chartStream), e.MarginBounds.Left, e.MarginBounds.Top); } }
  3. Hi, Please check this sample. For glassy effects, you should handle some properties like 3d effects, gradients and opacity. Here is a sample that contains some styles that might help. http://support.softwarefx.com/FeaturedSamples/Demo/Net/ChartAsNavigation.zip Also, from the Chart Gallery, is there any particular style you want? please post the "sample name" so I can provide more usefull code to you (for example 3D side by side Bar Chart).
  4. Hi, Can you replicate this in a simple application: for example, you create a new project with a single page, and drop a chart inside. Add the needed chart FX code. In this scenario, your application is presenting the same trouble? Happens the same with firefox, chrome and other browsers? I need more information, in order to help you better.
  5. Hi, How is the chart crashing or when it is crashing? can you provide a code snippet that replicates the issue?
  6. Hi I created an empty aspnet page and in the page load I coded the following: using ChartFX.WebForms;using ChartFX.WebForms.Writer.Svg; .......... on Page Load method ....... Chart chart1 = new Chart(); chart1.Gallery = Gallery.Bar; chart1.Data.Points = 3; chart1.Data.Series = 1; chart1.Data[0, 0] = 30; chart1.Data[0, 1] = 60; chart1.Data[0, 2] = 90; chart1.Height = 600; chart1.Width = 600; chart1.ID = "test"; chart1.ImageSettings.Interactive = false; chart1.RenderFormat = "SVG"; SvgWriter svgWriter = new SvgWriter(); chart1.OutputWriter = svgWriter; chart1.RenderControl(); I also installed the SVG viewer component from Adobe: http://www.adobe.com/svg/viewer/install/ Hope this helps.
  7. Hi Mick, Yes, I removed the post since I put the wrong snippet: the correct one is chart1.AxisY.Grids.Major.Visibility = Visibility.Collapsed; this because I set the strokeThickness instead. I was about to repost it, but it seems that the other snippet all ready helped. Well im glad your code is now working. If you need further assistance, just let us know. Im always glad to help.
  8. Hi, Try this code: // Define Chart Object and Points int nSeries = 1; int nPoints = 5; Chart1.Gallery = Gallery.Pie; Chart1.Data.Series = nSeries; Chart1.Data.Points = nPoints; // Add sample data to Chart Chart1.Data[0, 0] = 45000; Chart1.Data[0, 1] = 75000; Chart1.Data[0, 2] = 25000; Chart1.Data[0, 3] = 35000; Chart1.Data[0, 4] = 85000; // Configure Point Labels. Chart1.AxisY.LabelsFormat.Culture = new System.Globalization.CultureInfo("en-US"); Chart1.AxisY.LabelsFormat.Format = AxisFormat.Number; // display as number (no currency $). Chart1.AxisY.LabelsFormat.Decimals = 2; // Make all series to show the value as point labels and show only series 1 Chart1.Series[0].PointLabels.Visible = true; Chart1.AllSeries.PointLabels.Format = "%v mn";
  9. Hi Dan, Thanks, if you need further assistance, just let us know.
  10. Hi, try removing this line: Chart1.AxisY.LabelsFormat.Format = AxisFormat.Currency; // optional.
  11. Hi, You cannot databind this automatically to the chart. So, you must loop over your datarows from all yoour datatables in order to bind them to the chart manually. Depending on how your are going to compose the series on the chart, you should loop over them. So, you can get the information from from a single datarow or by merging up all the rows for the first column into a collection (int[] intArray = new int[100] and setting up the collection to a Chart ListProvider object. If you want to get more ways you can do this, please check the "Passing Data" sample that comes with the Chart FX Resource Center [Programmers Guides and Samples - Passing Data - Sample Applications] If you need more assistance, please let me know.
  12. Hi, Please look at the following snippet. The point labels will use the format set to the Y Axis. // Define Chart Object and Points int nSeries = 1; int nPoints = 5; Chart1.Gallery = Gallery.Pie; Chart1.Data.Series = nSeries; Chart1.Data.Points = nPoints; // Add sample data to Chart Chart1.Data[0, 0] = 45000; Chart1.Data[0, 1] = 75000; Chart1.Data[0, 2] = 25000; Chart1.Data[0, 3] = 35000; Chart1.Data[0, 4] = 85000; // Configure Point Labels. Chart1.AxisY.LabelsFormat.Culture = new System.Globalization.CultureInfo("en-US"); Chart1.AxisY.LabelsFormat.Format = AxisFormat.Currency; // optional. Chart1.AxisY.LabelsFormat.Decimals = 2; // Make all series to show the value as point labels and show only series 1 Chart1.Series[0].PointLabels.Visible = true; Chart1.AllSeries.PointLabels.Format = "%v"; Hope this helps.
  13. juanZ

    Hotfix installs

    Hi, You should have then to request it directly to the Software FX support team. Please send an email to, support [at] softwarefx.com and copy your serial number in order to request the latest wpf dlls. I,m always glad to help.
  14. Try to call the Load Data at the usercontrol loaded and the SetUpMatrix() method at the Chart Loaded event like this: public Window1() { InitializeComponent(); LoadData() chart1.Loaded += new RoutedEventHandler(chart1_Loaded); } void chart1_Loaded(object sender, RoutedEventArgs e) { // Once the chart is rendered. SetUpMatrix(); }
×
×
  • Create New...