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 8491275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:22:19+00:00 2026-06-10T22:22:19+00:00

I am designing (not programming) a data-series viewer program for medical data, using C#/WPF.

  • 0

I am designing (not programming) a data-series viewer program for medical data, using C#/WPF. There is one main panel which shows the data, with the common mouse pan/zoom functionality (pan with left drag, horizontal zoom with scroll, vertical auto-fit with double click, selection with right drag).

The problem is: I need vertical and horizontal grid with rulers on the top/left, similar to those seen in audio-editing (goldwave, audacity), cartography (gpsTrackmaker) and ilustration (photoshop, inkscape) programs. Besides, these rulers are even configurable in most plotting APIs (Matlab, GNUPlot, Matplotlib) and even office programs (Excel, Calc).

The main requisite, besides being always aligned and scaled to content, is to have an “anti-clutter” algorithm which only draws tick labels with the maximum granularity possible without the labels “hitting” or hiding one another.

Below is an image showing two zoom levels of the same drawing on Inkscape. The first row shows each hundred labels. The second row shows each decade labels.

The question is: “Since this (the auto-resolution of viewing rulers) seems to be a solved problem in many programs, how should I look for / what are the available resouces/tutorials so I can specify and implement such a control that suits my needs?”

I would appreciate any suggestion or example, preferrably in C#, but could be in any language.

enter image description here

  • 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-10T22:22:21+00:00Added an answer on June 10, 2026 at 10:22 pm
    • W = visible protion of the ruler
    • X = range (right-left) represented by W
    • w = label width

    n = W/w (maximum number of labels you can display)

    x = X*w/W (minimal range between two labels)

    Then you have to round x to some larger, cooler value 1, 2 or 5 in any magnitude.

    For example

    • x=18.4 => x1=20
    • x=539 => x1=1000

    w1 = x1/X*W (label width, or space between ticks)

    n1 = W/w1 (number of ticks)

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

Sidebar

Related Questions

While designing a new WPF application I noticed exceptions not being thrown during data
I'm designing a very secure login mechanism using play framework2. Since Play does not
We are designing a Flash-based language course, and I am not sure which architecture
I am using 960.gs for designing website layouts. I could not able to find
I'm currently working on a Win32 program which requires a main window containing many
I'm wondering about some ideas which can improve process of designing solutions using Access
I'd be interested to know whether there are programming languages which have shorthand equality
I'm designing the Fact and Dimension tables for a data warehouse currently using SQL
I am not too versed in C++, but I had the task of designing
I am defining a Form class which has a filefield and is not mandatory

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.