How can i show the graph without x-y axis

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
copilot90
Posts: 13
Joined: Mon Aug 22, 2016 2:46 am

How can i show the graph without x-y axis

Post by copilot90 » Mon Jan 23, 2017 1:00 am

axis_original.png
axis_original.png (89.64 KiB) Viewed 20400 times
Hello

I'm making a graph software

I wonder graph option for axis

How can i draw the graph without x-y axis

plaese, look at the image file

have a nice day!

thanks !
Attachments
axis_trans.png
axis_trans.png (60.3 KiB) Viewed 20400 times

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: How can i show the graph without x-y axis

Post by ArctionPasi » Mon Jan 23, 2017 10:33 am

Hi,

you can set
xAxis.Visible = false
yAxis.Visible = false


or
- setting transparent colors to axis elements,
- setting ViewXY.AxisLayout.AutoAdjustMargins = false
- setting ViewXY.Margins = (0,0,0,0)
- setting axis.LabelsVisible = false
- setting axis.Title.Visible = false
- setting axis.MajorDivTickStyle.LineLength = 0.
- setting axis.MinorDivTickStyle.LineLength = 0.
LightningChart Support Team, PT

copilot90
Posts: 13
Joined: Mon Aug 22, 2016 2:46 am

Re: How can i show the graph without x-y axis

Post by copilot90 » Wed Feb 01, 2017 9:57 am

thank you for reply

I have a some question

Is it possible?

I had been try the method

but i did'nt see the attribute

I think that the method is WinForm Rule

Please Check and Help me

Thank you hava a nice day!

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: How can i show the graph without x-y axis

Post by ArctionPasi » Thu Feb 02, 2017 8:50 am

Hi,

Code: Select all

<Window x:Class="WpfApplication1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Grid Name="gridMain">
        
    </Grid>
</Window>

Code: Select all

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Arction.Wpf.Charting;
using Arction.Wpf.Charting.Axes;
using Arction.Wpf.Charting.SeriesXY; 

namespace WpfApplication1
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        LightningChartUltimate _chart; 
        public MainWindow()
        {
            InitializeComponent();

            _chart = new LightningChartUltimate();
            _chart.BeginUpdate(); 


            gridMain.Children.Add(_chart);

            PointLineSeries series = new PointLineSeries(_chart.ViewXY, _chart.ViewXY.XAxes[0], _chart.ViewXY.YAxes[0]);
            _chart.ViewXY.PointLineSeries.Add(series);

            
            SeriesPoint[] points = new SeriesPoint[] { new SeriesPoint(0, 0), new SeriesPoint(5, 2), new SeriesPoint(10, 7) };
            series.Points = points;

            //Hide axes and grids 
            _chart.ViewXY.YAxes[0].Visible = false;
            _chart.ViewXY.XAxes[0].Visible = false;
            
            _chart.EndUpdate();  

        }
    }
}
shows the chart like this:
Axes hidden from the chart
Axes hidden from the chart
AxesHidden.jpg (38.57 KiB) Viewed 20343 times
LightningChart Support Team, PT

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: How can i show the graph without x-y axis

Post by ArctionPasi » Thu Feb 02, 2017 8:56 am

If you want to show some margins, add this code:

Code: Select all

  
//Apply manual margins 
_chart.ViewXY.AxisLayout.AutoAdjustMargins = false;
_chart.ViewXY.Margins = new Thickness(20, 30, 20, 20);
Hidden axes with margins
Hidden axes with margins
HiddenAxesWithMargins.jpg (41.39 KiB) Viewed 20343 times
LightningChart Support Team, PT

Post Reply