Current filter:
                                You should refresh the page.
                                0
                                  • Hi.
                                    At runtime, I created a new serie in a simple line chart with ValueScaleType property = DateTime. My aim it to show in a tooltip the value with "hh:mm" format . For this I used the following C# code:
                                     
                                    lcls_NewSerie.Label.PointOptions.ValueDateTimeOptions.Format = DateTimeFormat.Custom;

                                    lcls_NewSerie.Label.PointOptions.ValueDateTimeOptions.FormatString = "hh:mm";

                                    Rather than showing the value with hh:mm format, show only my default date ("01-01-1980").
                                    What ́s wrong with these lines of code?

                                    Thanks in advance.

                                chart.png
                                You must  log in  or  register  to leave comments

                                1 Solution

                                1

                                I have tried to reproduce the problem you described, but failed. Attached is a small sample project that seems to work fine at our end.
                                Could you please provide me with step-by-step instructions on how to reproduce your problem and I will try to find an acceptable solution for you.

                                dxSample.zip
                                Show all comments
                                • eszencia 07.10.2012

                                  Hi.
                                  My sample project with step-by-step instructions you asked is attached .
                                  Thank you.

                                • Thank you for the clarification. The Series.Label.PointOptions property is meant for formatting Series Labels. In the provided sample project, the Crosshair Label is shown. To customize this label format, use the SeriesBase.CrosshairLabelPattern property. I have modified the sample project to illustrate this approach. You can find it in the attachment.

                                • eszencia 07.11.2012

                                  Hi.
                                  Sorry to bother you again... but first of all, thank your much for all support.

                                  Like you very well suggested, I used the SeriesBase.CrosshairLabelPattern property.
                                  It works fine for a a line serie. For a SideBySideRangeBar serie, otherwise, I can't used {V:HH:mm} pattern, because the serie has, as use know 2 values.

                                • You can use {V1} and {V2} placeholders to set the format for range bar labels. I have modified the sample project to illustrate this approach. You can find it in the attachment.

                                • eszencia 07.12.2012

                                  Thank you! It is solved!

                                • You are welcome.

                                  I am happy to hear that my assistance was helpful for you. Thank you for informing me.

                                  Thanks,
                                  Constant

                                You must  log in  or  register  to leave comments
                                You must  log in  or  register  to leave an answer

                                Is your intention to post an answer to your own question?

                                • If so, then proceed.
                                • If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
                                • If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.