Since the upgrade from 23.2.8 to 23.3.1 the Formatter for the DataLabels of PlotOptionsSeries is not working anymore.
e.g.
PlotOptionsSeries plotOptionsSeries = new PlotOptionsSeries();
plotOptionsSeries.getDataLabels().setEnabled(true);
plotOptionsSeries.getDataLabels().setFormatter("function() {return 'test';}");
shows the y value as DataLabel in the chart. Before the update the expected value of 'test' was shown.
I tried in JSFiddle and everything works as expected.
Edit:
Actually it doesn't matter what you pass as parameter for setFormatter, it seems it has no affect at all anymore.
I solved it by setting formatter of PlotOptions of Chart configuartion.
e.g.
PlotOptionsBar plotOptionsBar = new PlotOptionsBar();
plotOptionsBar.getDataLabels().setFormatter("return 'test';");
chart.getConfiguration().setPlotOptions(plotOptionsBar);
Related
I need to completely disable text entry on a DateRangeSelection, so that only the calendar selection can be accepted..
I can the disable text input for a DatePicker component with...
view.byId("__reportDate")._bMobile = true;
Unfortunately this doesn't work for a DateRangeSelection.
Is there anything else I can try?
There does not seem to be a standard property to do it, you can however tweak the underlying input element used to set it to readonly. This would disable any text input in the field. This might be one of the ways to do it.
var oDateSel = this.getView().byId("dateSel");
$("#"+oDateSel.sId+" input").prop("readonly",true);
Note: This is certainly not a standard approach according to the UI5 standards. Also you might have to set a handler to set the element to readonly if the control is re-rendered.
Solution was...
var dateSel = sap.ui.getCore().byId("dateRange");
$("#"+dateSel.sId+" input").prop("disabled",true);
(readonly wiped out the placeholder in IE).
I am using angular chart in one application which basically makes use of chart js. The version of chart js I am using at the moment is the 2.4.0, with angular chart version 1.1.1 (the current lastest one).
So, when I insert few series (for example 4) everything works fine. The problem is when I have cases that handle with 10 series at a time. The event of clicking the serie in order to hide it block somehow and this error is displayed in console:
Uncaught TypeError: Cannot read property 'clearRect' of null
at Object.helpers.clear (Chart.js:5880)
at Chart.Controller.clear (Chart.js:4072)
at Chart.Controller.draw (Chart.js:4365)
at ChartElement.animation.render (Chart.js:4345)
at Object.startDigest (Chart.js:3672)
at Chart.js:3645
To try to help you I moved to the line the error is occuring in Chart.js file:
// -- Canvas methods
helpers.clear = function(chart) {
chart.ctx.clearRect(0, 0, chart.width, chart.height);
};
Have anyone already got this problem? Does Chart js doesn't handle to many series?
Thanks
This was happening to me when I ran out of colors to use for my series. Once I fixed that the hiding and showing of series worked fine, plus no more errors.
How is it possible to set in Page TSConfig the default value for "Number of Columns" in TYPO3 V7.6? In erlier versions it was possible with TCEFORM.tt_content.imagecols = 1. If I set in V7.6 TCEFORM.tt_content.imagecols = 1 it makes no different which value is set. There is always imagecols = 2 set.
I have PHP 7.0.7 and use the rendering extension fluid_styled_content (not css_styled_content). Is there something I am missing?
Thanks in advance for your help.
TCAdefaults.tt_content.imagecols = 1
works for me in TYPO3 7.6.11
TCEFORM.tt_content.imagecols.config.default = 1 is not working, as described op.
Be aware: This config never works if you switch content type after saving a content:
https://forge.typo3.org/issues/75233
I am using an AJAX Control Toolkit: 'maskededitvalidator' to validate a textboxe's date entry. I am trying to set the minimum value programatically to today's date. I have tried both adding it to the source (and calling Page.DataBind()) or setting it in the code behind and niether work. No error, just the validation does not work. If I change the 'MinimumValue' property to a hardcoded value it works just fine. Any ideas? Thanks!
In the source directly on the control:
MinimumValue='<%# DateTime.Now.Date.ToString %>'
In the server code:
Me.txtDateMEV.MinimumValue = DateTime.Now.ToShortDateString()
I think this is more likely a "calendar" issue than a "maskedit" one.
Maybe you should try some Calendar option just like the example on Calendar Example. Check out the Calendar with date range, it looks like the problem you have.
I was never able to get the binding systax working in the source, but I did get it working in the code behind like below:
Me.txtDateMEV.MinimumValue = DateTime.Now.ToShortDateString()
I had a CSS style which was erasing the current date if it was left blank and did not have a default date set. Once I updated the CSS not to set 'display:none' for the .AJAXCalendar .ajax__calendar_today style, then the code above worked. So half fixed my issue because CSS was preventing the MinimumValue code to apply. However I really wanted to be able to use the binding syntax but I could never get it to work.
I created a dojo chart using;
var pieChart = new dojox.charting.Chart2D("pieChart");
Afterwards I want to update/destroy this chart. SO I do;
var pieChart = dojo.byId("pieChart");
pieChart.destroy();
This seems to be not functional. Am I doing something wrong here?
best
I ran into this same problem, where I created the chart in one place and then wanted to destroy it in another, but I didn't have a reference to the chart object. The only solution I found is to empty the DOM node you used to make the chart:
dojo.empty("pieChart");
As you're using dojox so dojo.byId will not return javascript object try using dijit.byId I think it'll work as suggested below:
var pieChart = dijit.byId("pieChart");
pieChart.destroy();
the same problem I was facing with dojox.form.BusyButton after a great effort I found this...
The second variable will reference DOM object, not the javascript object that store chart object.
var pieChart = new dojox.charting.Chart2D("pieChart");
pieChartDom = dojo.byId("pieChart"); //you cannot destroy,
pieChart.destroy(); //you can destroy, this is original variable
I hope it helps.