I am trying to create a pie chart that expands a pie slice when it is clicked as shown in this example.
Below is my ColdFusion code which, according to the ZingChart docs, allows a detach property to be set to true that should allow this behavior. It does not seem to be working however. The line-style property that I set works but not the detach property. Any help would be appreciated. Thanks!
<cfset plot = {"line-style":"dotted","detach": "true"}>
<cfchart format="html" title="Sales Report" plot="#plot#">
<cfchartseries type="pie">
<cfchartdata item="2012" value="25">
<cfchartdata item="2013" value="25">
<cfchartdata item="2014" value="25">
<cfchartdata item="2015" value="25">
</cfchartseries>
</cfchart>
Full disclosure, I'm a member of the ZingChart team.
The detached property does not work because the build cfcharts currently uses is not up to date with the build that the detached property was added.
Related
I have a question on some csl code.
I am trying to convert the "nature" style which is available through Zotero to an annotated style which gets the annotation by citing the "Extra" field (similar to APA 7th edition annotated).
I am not familiar with coding in csl so I found out thanks to google that all I had to do is add the line
<text variable="note" display="block"/>
before </layout>
(found this info here: https://forums.zotero.org/discussion/19552/annotated-bibliography-in-mla-or-chicago-style)
I did so and now I am getting the following error when generating the style in Zotero's style editor:
Error generating citations and bibliography:
citeproc-js error: Level mismatch error: wanted bib_first but found bib_other
I already checked my code with the CSL style and locale editor (https://validator.citationstyles.org/) and it gives me no errors. Googling this error message does't give any good results. I am trying to use this style in Microsoft Word once it works.
Here are the last couple of lines of the code (if the line <text variable="note" display="block"/> is removed, then the error is gone):
<text macro="editor"/>
<text macro="volume"/>
<text variable="page"/>
<text macro="issuance"/>
<text macro="access"/>
</group>
<text variable="note" display="block"/>
</layout>
</bibliography>
</style>
I would really appreciate if anyone could help with this. Thanks!
I don't think this is in the specifications, but you can't mix second-field-align in the bibliography settings with display set on individual elements (because they're doing the same type of things, so the CSL processor doesn't know what you actually want to do).
I see you found a solution, but that'll not print the annotations on a new line. If you still want that, go back to
<text variable="note" display="block"/>
But then remove the second-field-align from bibliography, i.e. for Nature, turn it into
<bibliography et-al-min="6" et-al-use-first="1" entry-spacing="0" line-spacing="2">
Ok, I was now able to fix this by replacing the line I added with
<text variable="note" prefix=""/>
There is no error message anymore and the citations look great! I will leave this question up, in case anyone is or will be struggling with the same problem.
I haven't tested this, but I think the problem is that you only used display="block" on a single element under <layout/>. Per https://docs.citationstyles.org/en/1.0.1/specification.html#display, "The display attribute ... may be used to structure individual bibliographic entries into one or more text blocks. If used, all rendering elements should be under the control of a display attribute."
If you want the annotations to appear on a new line, I'd try introducing a new <group display="block">...</group> that encompasses the original content of <layout/> in the bibliography section, followed by <text variable="note" display="block"/>.
I am getting the following error when I use a PlanningCalendar Control in my SAPUI5 application. It is not an element that I am destroying or recreating, but instead just used to display data. As a result I think I do not need to concern myself with this error. Is there any way I can get rid of it though? And why exactly is it popping up with the planning calendar? I am using SAPUI5 1.38.9.
During a clone operation, a template was found that neither was marked
with 'templateShareable:true' nor 'templateShareable:false'. The
framework won't destroy the template. This could cause errors (e.g.
duplicate IDs) or memory leaks (The template is used in aggregation
'appointments' of object '__row0').For more information, see
documentation under 'Aggregation Binding'. -
<PlanningCalendar
startDate="{path: '/startDate'}"
viewKey="D"
rows="{path: '/rows'}">
<views>
<PlanningCalendarView
key="A"
intervalType="Day"
description="days view"
intervalsS="1"
intervalsM="3"
intervalsL="7"
showSubIntervals="false">
</PlanningCalendarView>
<PlanningCalendarView
key="D"
intervalType="Hour"
description="hours view"
intervalsS="4"
intervalsM="6"
intervalsL="8"
showSubIntervals="true">
</PlanningCalendarView>
</views>
<rows>
<PlanningCalendarRow
text="{role}"
nonWorkingDays="{freeDays}"
nonWorkingHours= "{freeHours}"
appointments="{appointments}"
intervalHeaders="{headers}">
<appointments>
<unified:CalendarAppointment
tooltip="{title} {info}"
startDate="{start}"
endDate="{end}"
icon="{pic}"
title="{title}"
text="{info}"
type="{type}">
</unified:CalendarAppointment>
</appointments>
<intervalHeaders>
<unified:CalendarAppointment
startDate="{start}"
endDate="{end}"
icon="{pic}"
title="{title}"
type="{type}">
</unified:CalendarAppointment>
</intervalHeaders>
</PlanningCalendarRow>
</rows>
</PlanningCalendar>
Add templateSharable: false to your aggregation bindings of PlanningCalendarRow.
...
appointments="{path: 'appointments', templateShareable: false}"
intervalHeaders="{path: 'headers', templateShareable: false}"
...
This will allow us to let UI5 handle destroying templates when the binding is removed.
You can find the documentation about this here.
I'm trying to fix my cfchart in CF11 to look some similar like in previous CF9. I converted my .xml files and instead I use JSON to style my elements. Problem that I can not fix is cfchartseries. My data that i'm passing in my chartseries looks good, I tried to output everything on the screen before I tested my chart. In CF9 my Time records were displayed on the screen from the first value all the way up to the last value. Here is my screen shot of my chart in CF9:
As you can see on the picture above all my time slots are displayed on the screen in order from the lowest to the highest. Also my record for 2015 is displayed with the bar in blue color, 2016 in pink color. Now I will show you my chart with the exact same code in CF11:
You can see thatmy chart in CF11 starts with the blue bar that present year 2015 and time slot that should not be on the first spot 1415. Also my other time slots are not displayed on the screen. I have tried so hard to get this done but still did not find any solutions. I'm wondering if anyone can help with this problem. Below is my code and I will show you both codes for CF9 and CF11.
Code for chart in CF9:
<cfchart format="#ffPrint#" xaxistitle="#desc#" yaxistitle="#yTitle#" style="ChartStyle.xml"
chartheight="700" chartwidth="#graphWidth#" title="#title#" showlegend="#theLegend#" >
<cfchartseries type="bar" itemcolumn="Spacer" valuecolumn="" seriescolor="white" >
<cfoutput>
<cfloop list="#dataList#" index="i">
<cfchartdata item="#i#" value="0">
</cfloop>
</cfoutput>
</cfchartseries>
<cfoutput query="getRecords" group="theYear">
<cfchartseries type="bar" itemcolumn="#theYear#" valuecolumn="theCount" seriescolor="#listGetAt(theColors,colorIndex)#" >
<cfset colorIndex++>
<cfoutput>
<cfchartdata item="#Description#" value="#theCount#">
</cfoutput>
</cfchartseries>
</cfoutput>
</cfchart>
Code for my chart in CF11:
<cfchart format="html" xaxistitle="#desc#" yaxistitle="#yTitle#" style="#cStyle#"
chartheight="700" chartwidth="#graphWidth#" title="#newTitle2#" showlegend="#theLegend#">
<cfoutput query="getRecords" group="theYear">
<cfchartseries type="bar" itemcolumn="#theYear#" valuecolumn="theCount" seriescolor="#listGetAt(theColors,colorIndex)#" serieslabel="#theYear#">
<cfset colorIndex++>
<cfoutput>
<cfchartdata item="#Description#" value="#theCount#">
</cfoutput>
</cfchartseries>
</cfoutput>
</cfchart>
In order to get any records in CF11 I had to remove my first CFCHARTSERIES, still if I have combination of 2015 and 2016 years records my chart does not display values on the screen. I think that problem is in CFCHARTSERIES but I do not what should be changed to fix this issue. If anyone can help please let me know.
Thanks in advance!
I'm using Kendo ui's mvvm framework, and trying to get an input to apply a format so the number is formatted to two decimal places. Something like:
<input type="text" id="myTextbox" data-format="0.00" data-bind="value: variableInMyViewModel" />
...but it's not formatting the value. Can you use data-format on an input? If not, what is the best way to accomplish this?
I would probably not use a textbox to take in a number, I would switch to a kendo numerictextbox where you can set the format (n2), and the number of decimals.
<input data-role="numerictextbox" data-decimals="2" data-format="n2" data-bind="value: variableInMyViewModel" />
See demo at kendoui
http://demos.telerik.com/kendo-ui/numerictextbox/mvvm
See documentation at kendoui
http://docs.telerik.com/kendo-ui/api/javascript/ui/numerictextbox#configuration-format
Is there a way to create conditions (similar to if/else blocks) in the Eclipse plugin.xml's files.
I'm creating a Eclipse plugins in which I need to set a different value depending on the project facet, I'm getting the project facet using:
<with variable="projectFacet">
<test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="projectFacet" forcePluginActivation="true"/>
</with>
And then I have this code:
<item
label="test"
visible="false"
id="test.test1"
category="category1"
description="test description">
</item>
At this momment I'm hardcoding "category1", what I need is to select the correct category depending on the variable I got before, for example:
facet1 should be on the category1
facet2 should be on the category2
Someone knows how to do that? Thanks.