[Vtigercrm-developers] questions about merge requests
Angelo Paglialonga
info at angelopaglialonga.com
Wed Jun 23 10:19:17 GMT 2021
Ok I will take a look at it https://code.vtiger.com/vtiger/vtigercrm/blob/master/modules/Vtiger/models/Widget.php#L126,
it seems interesting !
I could provide a change request with donut and gauge widget types, let’s wait if Uma likes it.
There are lots of other options, you can modify just take a look at this snippet from file vtJqPlotInterface.js.
this.renderHorizontalbar = function() {
this.element.jqplot(this.data['chartData'], {
title: this.data['title'],
animate: !$.jqplot.use_excanvas,
seriesDefaults: {
renderer:$.jqplot.BarRenderer,
showDataLabels: true,
pointLabels: { show: true, location: 'e', edgeTolerance: -15 },
shadowAngle: 135,
rendererOptions: {
barDirection: 'horizontal'
}
},
axes: {
yaxis: {
tickRenderer: jQuery.jqplot.CanvasAxisTickRenderer,
renderer: jQuery.jqplot.CategoryAxisRenderer,
ticks: this.data['labels'],
tickOptions: {
angle: -45
}
}
},
legend: {
show: true,
location: 'e',
placement: this.legendPlacement,
showSwatch : true,
showLabels : true,
labels:this.data['data_labels']
}
});
}
_______________
Angelo Paglialonga
Consulente per soluzioni CRM ad alto ROI.
Telefono: 3386077866
Skype: angelo.paglialonga
Web: https://www.angelopaglialonga.com
> Il giorno 23 giu 2021, alle ore 12:04, Alan Lord <alanslists at gmail.com> ha scritto:
>
> You cannot define a default widget size.
>
> The Vtiger_Widget_Model class is initially instantiated from the Vtiger_Dashboard_Model by calling:
>
>> Vtiger_Widget_Model::getInstanceFromValues($row);
>
> This method does not support loading of inherited classnames:
>
> https://code.vtiger.com/vtiger/vtigercrm/blob/master/modules/Vtiger/models/Widget.php#L126
>
> Once the widget data is loaded onto the Dashboard, you can then use your own inherited Class as the Widget Model is loaded again, from the MyModule/dashboards/MyModule_CustomWidget_Dashboard class.
>
> But you cannot change the initial default sizing without changing the core Vtiger_Widget_Model class.
>
> Try it ;-)
>
> Al
>
> PS: If you get bored take a look eCharts: https://echarts.apache.org/examples/en/index.html
>
>
> On 23/06/2021 10:49, Angelo Paglialonga wrote:
>> Hi Alan you can bypass such limitations (title position, whatever option you need) , even add more widget types like gauges by including in your custom module a new vtJqPlotInterface, copy and paste from libraries/jquery/VtJqplotInterface.js
>> and add/modify for every widget type all options you need.
>> I hope that helps you!
>> _______________
>> Angelo Paglialonga
>> Consulente per soluzioni CRM ad alto ROI.
>> Telefono: 3386077866
>> Skype: angelo.paglialonga
>> Web: https://www.angelopaglialonga.com <https://www.angelopaglialonga.com>
>>> Il giorno 23 giu 2021, alle ore 11:40, Alan Lord <alanslists at gmail.com <mailto:alanslists at gmail.com>> ha scritto:
>>>
>>> On 23/06/2021 10:06, Angelo Paglialonga wrote:
>>>> Could we add new dashboards?
>>>
>>> You can add new widgets but there are some limitations:
>>>
>>> https://code.vtiger.com/vtiger/vtigercrm/issues/1026 <https://code.vtiger.com/vtiger/vtigercrm/issues/1026>
>>>
>>> Al
>>>
>>> _______________________________________________
>>> http://www.vtiger.com/
>> _______________________________________________
>> http://www.vtiger.com/
> _______________________________________________
> http://www.vtiger.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20210623/3ea2d712/attachment.html>
More information about the vtigercrm-developers
mailing list