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

Multiseries Vertical bullet

3 Answers 81 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
software
Top achievements
Rank 1
software asked on 20 Jun 2018, 11:08 AM

Hi,

How to customize the multiseries vertical bullet chart target value. and add tooltip for target

As below example target value is taking full width 

http://dojo.telerik.com/@tmplgis@gmail.com/OjubuBaB

3 Answers, 1 is accepted

Sort by
0
software
Top achievements
Rank 1
answered on 20 Jun 2018, 11:09 AM
Need to show target line width same as bar not complete column.....
0
Accepted
Tsvetina
Telerik team
answered on 22 Jun 2018, 11:43 AM
Hi,

This behavior of the Bullet series cannot be modified but you can achieve your goal using Column series with a custom visual that draws the target value. This custom visual also allows for setting a tooltip for the content that you draw:
visual: function(e) {
  // get the default column visual
  var visual = e.createVisual();
  var axis = e.sender.getAxis("value");
  // get the y coordinate at which the target line should be drawn
  var target = axis.slot(e.dataItem.target).origin.y;
  // draw the line as a kendo.drawing.Path element
  var path = new kendo.drawing.Path({
    stroke: {
      width: 4,
      color: e.options.target.color
    },
    tooltip: {
      content: "Target: " + e.dataItem.target
    }
  }).moveTo(e.rect.origin.x, target).lineTo(e.rect.topRight().x, target);
  // add the line to the existing column visual
  visual.append(path);
   
  return visual;
}

Here is an example where you can see the result: http://dojo.telerik.com/@tsveti/iwIfAWEr

Regards,
Tsvetina
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
software
Top achievements
Rank 1
answered on 28 Jun 2018, 09:01 AM

Hi Tsvetina,

Thanks a lot for quick reply.
Thanks a lot for support , It solves my question.

Once again thanks :)

Tags
General Discussions
Asked by
software
Top achievements
Rank 1
Answers by
software
Top achievements
Rank 1
Tsvetina
Telerik team
Share this question
or