A
A
Alexander Novikov2019-03-28 05:58:29
JavaScript
Alexander Novikov, 2019-03-28 05:58:29

Yandex.maps how to draw pieChart correctly?

I need to draw a pieChart on the labels, and make it look like a download. those. there are only two colors, base and fill, Q2KLwXKHL93EgA.jpg
I do it this way:

...
data: [
  { weight: 45, color: '#fff3cc'},
  { weight: 55, color: '#ffffff'},
],
iconContent: '45%',
...

It all works, but the chart is drawn in a strange way, from 0% to 50% is drawn counterclockwise, from 50% to 100% clockwise. for 50% I just unwrapped the circle:
[class*=-pie-chart-icon]{
  transform: rotateY(180deg);
}

but for the second part (from 50 to 100) I can't figure out how to implement it. I need to mark the ymaps tag with some class, but I don’t understand how to do it. Tell me if there is any solution with drawing pieChart so that colors are drawn in the right order or how to add a class to the ymaps tag (id will not help, because there will be many such points on the map)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Lander, 2017-01-02
@usdglander

Why not call $this->simple2()?

A
Arman, 2017-01-02
@Arik

// если вам нужно вызвать актуальное действие
// т.е. пока не переназначите данный метод в текущем классе,
// будет вызываться метод у родителя
$this->simple2(); 

// всегда вызывать метод родителя
parent::simple2();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question