Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8738867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:49:28+00:00 2026-06-13T10:49:28+00:00

First post here but been here 1000 times, really like the contribution from other

  • 0

First post here but been here 1000 times, really like the contribution from other members.
I know many of you will roll your eyes but I don’t have a lot to start with.
I have moderate understanding of c#, basic of MS C and somewhat more of Microchip C and ASM.
Trying to make an app for WinCE6 as a home automation main controller, have most of my module working and no is time to put the pieces together, Have a SQLCE database with 50 column and 1440 rows, that is for 50 device and 1440 minute for 1 day, all control’s will repeat their function every day. The database currently populated with random data for testing, now I want to create a visual control to create data, cant find CE version of MSChart control so I decided to make a x86 app where I can create my data. My difficulty mainly comes from inexperience, I can add or insert point to the Series but they will not insert in the order I want it to.

In this examples you can see what I would like to achieve;
1 no data point all 1440 record will have the same value.
2 added points to 200,400,600,800,1000,1100.
3 moved point at 400 on Y from270 to 350.
4 deleted point at 200,400,600,800.

Open to all suggestion.
Cant upload pictures so please follow the links.
Thanks

imgur.com/zsBla.jpg
imgur.com/y4wsn.jpg
imgur.com/Yo4XH.jpg
imgur.com/7FgHn.jpg


private void chart1_MouseClick(object sender, MouseEventArgs e)
    {
        var pos = e.Location;
        clickPosition = pos;
        var results = chart1.HitTest(pos.X, pos.Y, false, ChartElementType.PlottingArea);
        foreach (var result in results)
        {
            if (result.ChartElementType == ChartElementType.PlottingArea)
            {
                var xVal = result.ChartArea.AxisX.PixelPositionToValue(pos.X);
                var yVal = result.ChartArea.AxisY.PixelPositionToValue(pos.Y);
                //tooltip.Show("x=" + xVal + ", y=" + yVal, this.chart1, e.Location.X, e.Location.Y - 15);
                tk++;
                chart1.Series[0].Points.InsertXY (0,tk,yVal);
                //chart1.Series[0].Sort(PointSortOrder.Ascending);//.Points.InsertXY(0,xVal, yVal);
                Tick.Text = tk.ToString();
            }

        }
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T10:49:29+00:00Added an answer on June 13, 2026 at 10:49 am

    Elcast, looking over your issue it looks like your real problem is that you want your data to be “one-to-one”, and you almost get it with your sorted data, but probably the actual problem is how you are sorting the data.

    I put together a quick demo which I hope will help solve your problem:

     Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            Chart1.Series(0).ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line
            Chart1.Series(0).Points.AddXY(0, 10)
            Chart1.Series(0).Points.AddXY(1440, 100)
            Chart1.Series(0).Points.AddXY(600, 80)
    
            Chart2.Series(0).ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line
            Chart2.Series(0).Points.AddXY(0, 10)
            Chart2.Series(0).Points.AddXY(1440, 100)
            Chart2.Series(0).Points.AddXY(600, 80)
    
            Chart1.DataManipulator.Sort(System.Windows.Forms.DataVisualization.Charting.PointSortOrder.Descending, Chart1.Series(0))
    
        End Sub
    

    Which gives this (Left: Sorted, Right: Unsorted)
    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is my first post here but I've been a frequent reader of various
My very first post here! I have been using this site for many years
This is my first post, but I've been reading here for ages taking in
it's my first post in here, but you have been helping me indirectly in
This is my first post here - but I've been a reader for a
first post here, I come in peace :) I've searched but can't quite find
first post here, and probably an easy one. I've got the code from Processing's
first post here and hopefully relevant to many people. I'm working on writing integration
This is my first post, but I have been using this site for a
This is my first post here. I have been reading posts here since I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.