I have the following data which I need to display as a cluster of stacked chart for each month.
The chart should have two stacked bars for each month.
One would be a stacked bar chart of Historical_A and Historical_B
Other one would be for Monthly_A and Monthly_B.
I need to have the chart displayed as per this
Example Link.
I have been trying to manipulate the webchart XML as below but nothing has come out of it so far.
<elements action="" place="Stacked" drawOutline="false">
<morph morph="Grow"/>
<series place="default" index="0" shape="bar">
<paint color="#E48701"/>
</series>
<series index="1" place="stacked" shape="bar">
<paint color="#A5BC4E"/>
</series>
<series index="2" place="default" shape="bar">
<paint color="#1B95D9"/>
</series>
<series index="3" place="stacked" shape="bar">
<paint color="#CACA9E"/>
</series>
</elements>
Edit 1 : Found a similar chart in Highcharts. HighCharts Example
Related
I want to create a grouped object with multiple lines and fill the object with a background color.
As you can see, however, the background does not respect the lines as a frame.
Is it possible to fill only the grouped object within the lines?
It's not possible using grouped lines (style will be applied to whole group which have shape of rectangle) , but you can create custom shape using Arrange > Insert > Shape. You can find description how to do that here or here. If you want to edit shape after inserting it, you can do that using Edit Shape from Style tab in format panel on right (it is also possible to edit some of draw.io shapes).
Example shape similar to your image:
<shape h="100" w="100" aspect="variable" strokewidth="inherit">
<foreground>
<path>
<move x="50" y="0" />
<line x="80" y="40" />
<line x="100" y="50" />
<line x="60" y="100" />
<line x="30" y="100" />
<line x="0" y="60" />
<close />
</path>
<fillstroke />
</foreground>
</shape>
Remeber to use <fillstroke /> or <fill /> if you want colored background.
I have a very large form with hundreds of fields on it. Some are black and some are blue. I'm trying to parse the dxl using xsl to find the fields where they are set to the color blue.
i've found several xsl files to parse the dxl but I can'tfigure out how to find the field then find the previous font color='blue'
Can anyone help me with that syntax? Here is a sample of the dxl I am trying to parse:
<par def="100">
<run>
<font size="9pt" style="bold" name="Arial" pitch="variable" truetype="true" familyid="20" />
</run>
<run>
<font size="9pt" color="blue" style="bold" name="Arial" pitch="variable" truetype="true" familyid="20" />
<field type="text" kind="editable" name="DevComments">
<code event="inputtranslation">
<formula>#Trim( #ThisValue )</formula>
</code>
</field>
</run>
<compositedata type="98" prevtype="65418" nexttype="222" afterparcount="6" containertype="65418" aftercontainercount="1" afterbegincount="3">Yg4BAIQAAAAAAAAAAAA=</compositedata>
<run>
<font size="9pt" style="bold" name="Arial" pitch="variable" truetype="true" familyid="20" />
</run>
</par>
I have been struggling with the null pointer for hours! It happened when I used the getLayer() method to get a layer from the tiled map in cocos2d-x (the tailed map is edited using the Tailed Map Editor).
map = TMXTiledMap::create("map/map1.tmx");
map->setAnchorPoint(Vec2(0.5, 0.5));
map->setPosition(Vec2(visibleSize.width / 2, visibleSize.height / 2 - 40));
this->addChild(map, 0, 100);
collidable = map->getLayer("collide")
collidable->setVisible(false);
The program didn't find the "collide" layer (it's a tiled layer) in my tailed map. However, it indeed exists in the TMX file :
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" tiledversion="1.1.5" orientation="orthogonal" renderorder="right-down" width="24" height="18" tilewidth="40" tileheight="40" infinite="0" nextlayerid="14" nextobjectid="2">
<tileset firstgid="1" name="Background" tilewidth="40" tileheight="40" tilecount="7" columns="7">
<image source="mapItems/background.png" width="280" height="40"/>
</tileset>
<tileset firstgid="8" name="tiles" tilewidth="40" tileheight="40" tilecount="16" columns="8">
<image source="mapItems/tiles.png" width="320" height="80"/>
</tileset>
<tileset firstgid="24" source="mapItems/collide.tsx"/>
<layer id="5" name="background" width="24" height="18">
<data encoding="base64" compression="zlib">
...(some code)
</layer>
<layer id="11" name="collide" width="24" height="18">
<properties>
<property name="collidable" value="true"/>
</properties>
<data encoding="base64" compression="zlib">
...
</data>
</layer>
<layer id="6" name="bricks" width="24" height="18">
<data encoding="base64" compression="zlib">
...
</data>
</layer>
<layer id="7" name="tops" width="24" height="18">
<data encoding="base64" compression="zlib">
...
</data>
</layer>
</map>
Moreover, I set breakpoint in the getLayer() method, and the program traverses and find all layers except the collide layer. Anyone can show me how to deal with this issue?
Okay, finally I solve this problem (4 hours since it occurred)... Despite I don't even know why.
The solution is editing the collide.tsx file. I tried to read it and found a sentence:
<image source="collide.png" trans=ff00ff width="40" height="40"/>
And this "trans=" seemed quite weird... So I deleted it. Then the issue was resolved.
I have a gantt chart which is created from a stacked bar chart. I am trying to make the h-axis titles look different from each others, like in the image below. I've look into the API and could not find any solution.
Does anyone know how to accomplish this?
Individual styling is not supported with Google API. So if you can handle risk of future code break you can 'manually' change text properties.
As a example I used Simple Example from google docs and change it to the stacked bar chart.
The following elements are created in DOM for labels on the left (2004 - 2007):
<g>
<text text-anchor="end" x="147" y="139.9" font-family="Arial" font-size="14" stroke="none" stroke-width="0" fill="#222222">2004</text>
</g>
<g>
<text text-anchor="end" x="147" y="216.9" font-family="Arial" font-size="14" stroke="none" stroke-width="0" fill="#222222">2005</text>
</g>
<g>
<text text-anchor="end" x="147" y="293.9" font-family="Arial" font-size="14" stroke="none" stroke-width="0" fill="#222222">2006</text>
</g>
<g>
<text text-anchor="end" x="147" y="370.9" font-family="Arial" font-size="14" stroke="none" stroke-width="0" fill="#222222">2007</text>
</g>
You can change them using for example:
var labels = document.querySelectorAll('text[text-anchor=end]');
for (var i = 0; i < labels.length; i++) {
if (labels[i].textContent == '2004') {
labels[i].setAttribute('font-weight', 'bold');
labels[i].setAttribute('font-size', '20');
}
if (labels[i].textContent == '2005') {
labels[i].setAttribute('font-style', 'italic');
labels[i].setAttribute('font-size', '20');
}
}
See whole example at jsbin.
According to this page http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-792e.html you can use a dataLabelStyle which can be "none", "value", "rowLabel", "columnLabel" or "pattern". However whenever i use "rowLabel", "columnLabel" or "pattern" the image doesn't show. There is no error, just a blank canvas where the image should be. Does any one know how to work around this?
Thanks
I had the same problem, and I found that when I add the legend attribute placement, that is when the chart disappears. The legend shows with the placement indicated, but no chart.
I finally figured out what to do, I started from scratch with the bare minimum pie chart with examples from this page:
WebCharts3D Piecharts
And I discovered that the order of the elements in the XML file was the issue.
This is how my XML file is now and it works:
<?xml version="1.0" encoding="UTF-8"?>
<paint paint="Plain" />
<title>
<decoration style="None"/>
</title>
<dataLabels style="Pattern" font="Arial-16-bold">
<![CDATA[
$(value), $(colPercent)
]]>
</dataLabels>
<legend placement="Right" font="Arial-16">
<decoration style="None"/>
</legend>
<insets left="10" top="10" right="5" />
<elements action="" shape="Area" drawOutline="false">
<morph morph="Blur" /> <!-- other options: grow, none -->
<series index="0">
<paint color="#E48701" /> <!-- orange -->
</series>
<series index="1">
<paint color="#A5BC4E" /> <!-- lime -->
</series>
<!-- ...(etc) -->
</elements>
</pieChart>
This test of the five(5) styles works fine for me.
Maybe it is your code? Probably not a version problem as dataLabelStyle was introduced back in MX7 .
<cfloop list="value,rowLabel,columnLabel,pattern,none" index="style">
<cfchart format="png" scaleFrom="0" scaleto="30">
<cfchartseries type="bar" dataLabelStyle="#style#">
<cfchartdata item="bar" value="25">
<cfchartdata item="foo" value="10">
</cfchartseries>
</cfchart>
</cfloop>