mirror of
https://codeberg.org/artfulrobot/contactcats.git
synced 2025-06-26 09:18:04 +02:00
WIP checkin
This commit is contained in:
parent
2ae781f6e3
commit
f88fb5f10e
3 changed files with 189 additions and 227 deletions
|
@ -7,7 +7,6 @@
|
|||
name="startDate"
|
||||
ng-model="$ctrl.startDate"
|
||||
/>
|
||||
DAte: {{$ctrl.startDate}}
|
||||
</div>
|
||||
<div crm-ui-field="{name: 'cc.endDate', title: ts('End date')}" >
|
||||
<input
|
||||
|
@ -26,30 +25,31 @@
|
|||
<div>
|
||||
<p ng-if="$ctrl.noStats">{{ts('No results')}}</p>
|
||||
|
||||
<div class="rfm-sk" >
|
||||
<div class="contact-cats-sankey" >
|
||||
<svg viewBox="0 0 {{ $ctrl.sankey.width }} {{ $ctrl.sankey.height }}"
|
||||
width="{{$ctrl.sankey.width}}"
|
||||
height="{{$ctrl.sankey.height}}"
|
||||
style="width: 100%; height: auto;"
|
||||
version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<defs>
|
||||
<linearGradient
|
||||
ng-repeat="p in $ctrl.sankey.rows"
|
||||
id="{{p.gradient.id}}"
|
||||
>
|
||||
<stop offset="0%" stop-color="{{p.gradient.from}}" />
|
||||
<stop offset="100%" stop-color="{{p.gradient.to}}" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<defs>
|
||||
<linearGradient
|
||||
ng-repeat="p in $ctrl.sankey.snakes"
|
||||
id="{{p.gradientId}}"
|
||||
>
|
||||
<stop offset="0%" stop-color="{{p.fromCat.color}}" />
|
||||
<stop offset="100%" stop-color="{{p.toCat.color}}" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
|
||||
<path ng-repeat="p in $ctrl.sankey.rows"
|
||||
<path ng-repeat="p in $ctrl.sankey.snakes"
|
||||
d="{{p.d}}"
|
||||
fill="{{p.fill}}"
|
||||
fill-opacity=0.5
|
||||
>
|
||||
<title>{{p.n}} {{p.previousLabel}} → {{p.newLabel}}</title>
|
||||
<title>{{p.source.contact_count}} {{p.fromCat.name}} → {{p.toCat.name}}</title>
|
||||
</path>
|
||||
<!--
|
||||
<g ng-repeat="label in $ctrl.sankey.labels">
|
||||
<text x="{{$ctrl.sankey.labelWidth - 4}}"
|
||||
y="{{label.y}}"
|
||||
|
@ -64,6 +64,7 @@
|
|||
>{{label.label}}</text>
|
||||
</g>
|
||||
<!-- ticks on vertical axis -->
|
||||
<!--
|
||||
<path ng-repeat="label in $ctrl.sankey.labels"
|
||||
d="M{{$ctrl.sankey.labelWidth - 4}},{{label.y}} l4,0
|
||||
M{{$ctrl.sankey.width - $ctrl.sankey.labelWidth}},{{label.y}} l4,0"
|
||||
|
@ -73,9 +74,11 @@
|
|||
class="sk1"
|
||||
stroke-width=1 stroke='#333'></path>
|
||||
<!-- vertical axis -->
|
||||
<!--
|
||||
<path d="M{{$ctrl.sankey.labelWidth}},0 l0,{{$ctrl.sankey.height}}
|
||||
M{{$ctrl.sankey.width - $ctrl.sankey.labelWidth}},0 l0,{{$ctrl.sankey.height}}"
|
||||
stroke='#333'></path>
|
||||
-->
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue