This is a migrated thread and some comments may be shown as answers.

[Solved] Draw Vertical Line on Chart with Razor

2 Answers 25 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Cameron
Top achievements
Rank 1
Cameron asked on 05 Mar 2013, 05:08 PM
I can't figure out how to make a vertical line on the chart. Something like this that shows on the picture.
I've been working with this module:

.CategoryAxis(axis => axis            
        .Title("Days")
              
        .MajorGridLines(a => a.Visible(false))
   
        .Categories(ViewBag.YYY)
)
  .ValueAxis(axis => axis
                         
    .Numeric()
                       
    .Title("Issues")
               
          .MajorGridLines(lines => lines.Visible(false))
          
        .Min(0)
                  
      .Max(ViewBag.YYY)
)

      

2 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 08 Mar 2013, 08:57 AM
Hi Cameron,

I am afraid what you would like to achieve is not supported in Chart for ASP.NET MVC and there is no suitable workaround I can suggest. Please accept my apologies for the inconvenience caused.
 
Regards,
Iliana Nikolova
the Telerik team
Check out the successor of Telerik MVC Extensions - Kendo UI for ASP.NET MVC - and deem it for new ASP.NET MVC development.
0
Cameron
Top achievements
Rank 1
answered on 08 Mar 2013, 02:23 PM
i found out a way to make this and works for me and works fine, and even working with buttons and <a href="#"></a>:


.CategoryAxis(axis => axis
                  .Categories(new[] { "0-7", "8-14", "15-21" + CreateLine(), "22-28", "29+" }))
 
 
@helper CreateLine(){
<
div id="goalLine"style="
                   border-right: 2px dashed #000000;
                   height: 250px;
                   margin: -275px -95px 0 "
>&nbsp; Goal &nbsp;
</
div>}
Tags
General Discussions
Asked by
Cameron
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Cameron
Top achievements
Rank 1
Share this question
or