Focal Point
[SOLVED] To align bars and markers centrally

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/419104622

September 01, 2009, 01:48 AM
rp
[SOLVED] To align bars and markers centrally
Hi All,
I have a chart for which Bars are plotted on Y1 axis and markers are plotted on Y2 axis.but on the chart i need both bars and markers to be
aligned centrally.whats the graph function for that.i used the function setAlignMultiYBars(true),but no difference.
here is my code against car table.
GRAPH FILE CAR
SUM LENGTH WIDTH HEIGHT WEIGHT RPM SEATS
ACROSS COUNTRY
ON GRAPH SET LOOKGRAPH VBRSTK2
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET GRID ON
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
-*setAlignMultiYBars(true);

setMarkerSizeDefault(50);
setLineWidth(getSeries(4),0);
setLineWidth(getSeries(5),2);
setMarkerShape(getSeries(4),getMarkerShape(getSeries(5)));
setMarkerDisplay(true);
setUseSeriesShapes(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);

setO1LabelDisplay(true);
setO1LabelRotate(0);
setO1AxisSide(0);
setFillMissingData(0);
setO1MajorGridDisplay(false);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setSeriesType(0,1);
setAxisAssignment(1,0);
setSeriesType(1,1);
setAxisAssignment(2,0);
setSeriesType(2,1);
setAxisAssignment(3,0);
setSeriesType(3,1);
setAxisAssignment(4,1);
setSeriesType(4,2);
setAxisAssignment(5,1);
setSeriesType(5,2);
setCurveFitType(5,1);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setY2LabelDisplay(true);
setY2AxisSide(1);
setY2MajorGridDisplay(false);
setY2MajorGridStyle(0);
setY2MinorGridDisplay(false);
setTextFormatPreset(getY2Label(),-1);
setTextFormatPattern(getY2Label(),"#.##");
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setLegendDisplay(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setPlace(true);


thanks
rp

This message has been edited. Last edited by: Kerry,


webfocus 7.6.9 windows XP Excel
September 15, 2009, 03:54 PM
VLozovsky
I've tried your test procedure and it looks like the markers line up with the bars only on a single-axis stacked chart, but not on dual-axis.

You can open a case with Customer Support (1-800-736-6130) and I'll be happy to review it.
September 16, 2009, 01:55 AM
rp
I have achieved it by commenting ON GRAPH SET LOOKGRAPH VBRSTK2 and introducing setGraphType(44);

Now the code looks like:
GRAPH FILE CAR
SUM LENGTH WIDTH HEIGHT WEIGHT RPM SEATS
ACROSS COUNTRY
-*ON GRAPH SET LOOKGRAPH VBRSTK2
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET GRID ON
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
setGraphType(44);
setO1LabelDisplay(true);
setO1LabelRotate(0);
setO1AxisSide(0);
.......................
......................

Thanks
RP Smiler


webfocus 7.6.9 windows XP Excel
September 16, 2009, 10:59 AM
VLozovsky
RP, that was a good solution.

You can also use the following ON GRAPH SET LOOKGRAPH VLINSTK2, which is an equivalent of graph type 44 (vertical dual-axis stacked line chart).