SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

Answered
3
0

Hi Guys,

My Sci Chart has dates along the X-Axis. So far my data is at week level (one point for each week).

Ideally I would like to have a subtle grid line at each week, a more noticeable grid line to represent the start of each month, and a major grid line to represent the start of each year.

I understand that the current implementation of the XAxis seems to only use Minor and Major gridlines.

I am interested in drawing grid lines such that:

one minor vertical grid-line is drawn on the start of each week
one medium vertical grid-line is drawn on the start of each month
one major vertical grid-line is drawn on the start of each year
And for these grid lines to be drawn regardless of the current visible range or “zoom” of the chart.

Is there a simple tutorial or some snippet of code illustrating what I need to overwrite in a custom class in order to get this functionality into my chart?

Thanks again,
Miles

    • Guest
    • 10 months ago
    Oakley aurinkolasit myyntiOakley aurinkolasien pistorasiaanOakley aurinkolasit halpaoakley elämäntyyli aurinkolasit ulostulon, halpaa oakleysit tukkutason online –US Dollar Euro GB Pound Canadian Dollar Australian Dollar Jappen Yen Norske Krone Swedish Krone Danish Krone CNYRyhmätaktiivinen camo miehet naiset Polarisoitu Ray Ban Urheilu Uutuudet Lifestyle Big Taco Eyepatch 2 Frogskins Gascan Holbrook Jupiter Jupiter Carbon Jupiter Squared Lähettää Lähetys II Öljynporauslautta Öljytynnyri Polttoainekenno Silmälappu valuuttaEsittelyssä – … Ray Ban RB4169 Laramie Aurinkolasit kiillotus musta runko vaaleansininen linssi €17.12ray – ban rb8301 tech aurinkolasit suorittaa lavastaa grey, jonka linssiä €17.16 oakley vapaana aurinkolasit avoimia keltainen lavastaa gray linssi oakley20156447 €20.48Home ::  LifestyleLifestyleFilter Results by: Tuotteet jotka alkavat kirjaimella … A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9Listattuna 1 – 18 (372 tuotteesta)  1  2  3  4  5 …  21   >> alennuksen oakley polttokenno – aurinkolasit crystal harmaa lavastaa musta ash linssi myytävänä €21.54 Alennus Oakley polttokenno aurinkolasit Reluster musta kehys harmaa linssi myytävänä €22.11 diskontattu oakley polttokenno – aurinkolasit crystal lavastaa jäävettä linssi myytävänä €15.78 Edulliset Fake Oakley Valuutan aurinkolasit myyntiin USA Ilmainen toimitus OAKLEY20156044 €19.14 Edulliset Fake Oakley Valuutan aurinkolasit myyntiin USA Ilmainen toimitus OAKLEY20156047 €27.21 Fake Oakley Big Taco Aurinkolasit Edullinen myynti Ilmainen toimitus OAKLEY20156015 €27.54 Fake Oakley Big Taco Aurinkolasit Edullinen myynti Ilmainen toimitus OAKLEY20156016 €14.53 Fake Oakley Big Taco Aurinkolasit Halpa Myynti Ilmainen toimitus OAKLEY20156013 €25.83 Fake Oakley Big Taco Aurinkolasit Halpa Myynti Ilmainen toimitus OAKLEY20156014 €25.36 Fake Oakley Big Taco aurinkolasit halvalla myyntiin Ilmainen toimitus OAKLEY20156011 €19.83 Fake oakley dispatch II aurinkolasit Valkoinen kehys harmaa linssi OAKLEY201567303 €21.61 Fake oakley eyepatch 2 aurinkolasit Black Orange Frame keltainen sininen linssi OAKLEY201567172 €23.36 Fake oakley eyepatch 2 aurinkolasit Brown Frame Brown Objektiivi OAKLEY201567175 €17.53 Fake oakley eyepatch 2 aurinkolasit Kiillotus musta kehys Camo linssi OAKLEY201567182 €20.52 Fake oakley eyepatch 2 aurinkolasit Kiillotus musta kehys harmaa linssi OAKLEY201567185 €23.09 Fake oakley eyepatch 2 aurinkolasit kiillotus musta kehys harmaa linssi OAKLEY201567186 €23.12 Fake oakley eyepatch 2 aurinkolasit kiillotus musta kehys hopea linssi OAKLEY201567189 €23.24 Fake oakley eyepatch 2 aurinkolasit Kiillotus musta kehys Ice Blue Lens OAKLEY201567187€23.22Listattuna 1 – 18 (372 tuotteesta)  1  2  3  4  5 …  21   >> kotiin    merenkulku    tukkukauppa    tilauksen seuranta    kuponkeja    maksutavat    ota yhteyttäray – ban aktiivinen elämäntapa   ray – ban lentäjä   ray – ban karibian   ray – ban kissoja.   ray – ban clubmaster   tekijänoikeuden © 2014 kaikki oikeudet pidätetään.Oakley aktiivinen aurinkolasit 2048 Oakley aktiivinen aurinkolasit 2057 oakley aurinkolasit tukkukauppa blog oakley aurinkolasit tukkukauppa About oakleyoutlet.cn blog
  • You must to post comments
Best Answer
3
0

Hi Miles,

SciChart is only configured to draw two gridlines, major and minor. There are three ways I can suggest you do this (or close enough)

a.) Simplest way, manually calculate Major, MinorDelta

Configure the chart by setting AutoTicks=False and set the MajorDelta, MinorDelta to weeks and months.

See this KB article on Axis Gridlines, Ticks, Label Formatting which shows how to set MajorDelta, MinorDelta and AutoTicks to get simple adjustment of the tick frequency.

In SciChart a TimeSpan of one month is defined as this:

private const double DaysInMonth = 365.2425 / 12.0;

// Usage, 3 month timespan defined by Timespan t = FromMonths(3)
public static TimeSpan FromMonths(int numberMonths)
{
    return TimeSpan.FromDays(numberMonths * DaysInMonth);
}

This would achieve you month, week gridlines but not day. As you zoom in you could however switch the Major,Minor delta of the chart to show weeks and days.

more b. Complex way, use the TickProvider API

In SciChart v3.0 and above, there is now a way to override the exact Tick Intervals.

See this KB article on Advanced Tick Frequency Overriding which introduces the TickProvider API. This allows exact calculation of ticks (Axis Major, Minor gridlines and labels) as the axis is drawn.

Hope this helps!

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.