Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
145995 | Jul 17,2019 02:29 AM UTC | Jul 18,2019 04:52 AM UTC | WinForms | 3 |
![]() |
Tags: Chart |
this.chart1.VisibleRangeChanged += Chart1_VisibleRangeChanged;
private void Chart1_VisibleRangeChanged(object sender, EventArgs e)
{
//Maximum value of x axis while zooming
var maxValue = chart1.PrimaryXAxis.VisibleRange.Max;
//Mimimum value of x axis while zooming
var minValue = chart1.PrimaryXAxis.VisibleRange.Min;
//convert double value to DateTime value
DateTime max = DateTime.FromOADate(maxValue);
DateTime min = DateTime.FromOADate(minValue);
MessageBox.Show("Max:" + max + "\n" + "Min:" + min);
} |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.