GithubHelp home page GithubHelp logo

steema / teechart-net-pro-samples Goto Github PK

View Code? Open in Web Editor NEW
10.0 9.0 10.0 111.04 MB

This repository includes all the content and samples that make use of the TeeChart NET Pro product.

Home Page: https://www.steema.com/product/net

C# 64.46% CSS 6.45% JavaScript 2.88% SCSS 2.84% HTML 1.73% ASP.NET 2.36% Visual Basic .NET 19.28% Dockerfile 0.01%
blazor-charts blazor-controls chart charting charting-library charts charts-and-graphs charts-ios maui-chart winforms-controls wpf-controls asp-net dotnet winforms wpf blazor-components data-visualizations xamarin xamarin-library interactive-charts

teechart-net-pro-samples's Issues

ArgumentNullException in TeeChart.Maui.Gallery

Hi,
I'm having trouble when trying out the Maui example for the TeeChart control.
Here are the details:

Development Environment

  • Microsoft Windows 10 Pro, Version 21H2, OS build 19044.2130
  • Microsoft Visual Studio Professional 2022 (64-bit) - Version 17.3.6

Steps to reproduce

  • Download this repository
  • Open 'TeeChart-NET-Pro-Samples-main\MAUI\TeeChart.Maui.Gallery\TeeChart.Maui.Gallery.sln' in Visual Studio
  • Select 'Windows Machine' as the target
  • Build and Run the solution

Result

System.ArgumentNullException
HResult=0x80004003
Message=Value cannot be null. (Parameter 'type')
Source=System.Private.CoreLib
StackTrace:
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at Steema.TeeChart.Drawing.Shape.get_Pen()
at Steema.TeeChart.Panel..ctor(Chart c)
at Steema.TeeChart.Chart.InitVars()
at TeeChart.Maui.ChartView..ctor()
at TeeChart.Maui.Gallery.MainPage.OnCounterClicked(Object sender, EventArgs e) in .....\TeeChart-NET-Pro-Samples-main\MAUI\TeeChart.Maui.Gallery\MainPage.xaml.cs:line 25
at TeeChart.Maui.Gallery.MainPage..ctor() in .....\TeeChart-NET-Pro-Samples-main\MAUI\TeeChart.Maui.Gallery\MainPage.xaml.cs:line 11
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)

Can someone help me make this working?

Export as image

Hello, I am a beginner with TeeChart, and I am currently facing some difficulties in using TeeChart-Net. My English is not very good, so please forgive me. Here are the details:

I want to try exporting vector graphics in my code, as follows:

//string imagePath = ConstantUtil.AppFilePath + "temp\temp_report_chart_" + DateTime.Now.Ticks + cnt.ToString() + ".wmf";
//MetafileFormat metafile = chart.Export.Image.Metafile;

//metafile.Height = 370;
//metafile.Width = 758;
//metafile.Save(imagePath);

However, I have encountered an issue. When exporting in BMP format, the line thickness is normal. But when exporting in vector graphic format (WMF), the lines become thicker, and even when I modify the line thickness property, it doesn't change.

So, how should I handle this to prevent the lines from becoming too thick in WMF format?

Thank you for your assistance.

ChartView Not Defined

I am upgrading a project from Xamarin Forms to MAUI.

In my code I have the following:

        ChartView _chart;
        _chart = new ChartView();

When I open my Xamarin Forms version of the project, this is defined and when I right click go to definition it takes me to the object browser and shows it is defined in the Steema.TeeChart namespace.

In my MAUI version of the project I have added the nuget package for MAUI and use this same code. In the MAUI project I get an error that ChartView is not defined and I can't seem to find it anywhere.

I went to the Gallery example and it has the example same code as above for the MAUI example.

What is going on? Where is ChartView defined and how to I get it into my project?

Rotate example for MAUI or it is not working

I am updating a Xamarin Forms app to MAUI. I have a surface chart with a rotate tool that works fine on Xamarin Forms.

After updating everything to MAUI and getting the chart to show up the rotate tool doesn't seem to work.

Here is the code:

                _surface1 = new Steema.TeeChart.Styles.Surface();
                _points3D1 = new Steema.TeeChart.Styles.Points3D();
                _tower1 = new Steema.TeeChart.Styles.Tower();
                _rotate1 = new Steema.TeeChart.Tools.Rotate();

                _chart.Chart.Series.Add(_points3D1);
                _chart.Chart.Series.Add(_surface1);
                _chart.Chart.Series.Add(_tower1);
                _chart.Chart.Tools.Add(_rotate1);

                _surface1.IrregularGrid = true; // <-- IMPORTANT ! means X and Z are float

                _surface1.UseColorRange = false;

                // adjust some axes properties...
                _chart.Chart.Axes.Depth.Visible = true;
                _chart.Chart.Axes.Depth.Labels.ValueFormat = "0.#";
                _chart.Chart.Axes.Depth.Increment = 0.2;
                _chart.Chart.Axes.Bottom.Labels.ValueFormat = "0.#";
                _chart.Chart.Axes.Bottom.Increment = 0.1;
                _chart.Chart.Axes.Bottom.Inverted = true;
                _chart.Chart.Axes.Automatic = true;

                // visual properties...
                _chart.Chart.Aspect.Chart3DPercent = 100;
                _chart.Chart.Aspect.Orthogonal = false;
                _chart.Chart.Aspect.Perspective = 50;
                _chart.Chart.Aspect.Rotation = 327;
                _chart.Chart.Aspect.Elevation = 352;
                _chart.Chart.Aspect.Zoom = 70;
                _chart.Chart.Aspect.View3D = true;

                _chart.Chart.Legend.Visible = false;

                _chart.Chart.Panning.Allow = ScrollModes.None;

                _chart.Chart.IOpenGL = true;

                _rotate1.Active = true;
                _rotate1.Style = Steema.TeeChart.Tools.RotateStyles.All;

I couldn't find an example for MAUI, so just used the Xamarin Forms code.

I suspect maybe we need a handler or something else...

Line Style not Working on MAUI

I found another issue. I verified this one in the example project:

            var line = new FastLine(tChart1.Chart);
            line.LinePen.Style = Steema.TeeChart.Drawing.DashStyle.Dash;
            line.FillSampleValues();

The line style stays solid. I also tried Dot and it doesn't change either.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.