Hi, I have been trying to get my way round the DOJO charting using the declarative (html) method.

1. I have a ItemFileReadStore for the data source

2. I know the data store has data as I am outputting it to a grid as well.

The only thing that appears is the axes and the numbering for the x axis, there is no line and the numbering for the y - axis, tried googling, but to no avail.

Please assist.

Thanks in advance.

<span dojoType="dojo.data.ItemFileReadStore" id="query_report" jsId="query_report" clearOnClose="true" url="http://localhost/index.php/sales1_controller/GetTotalRevenue/2011" ></span>

	<div class="gridContainer">

		<div dojoType="dojox.charting.widget.Chart2D" id="chart1" style="width: 500px; height: 500px;" store="query_store">
			<div class="plot" name="default" type="Lines"></div>
			<div class="axis" name="x"></div>
			<div class="axis" name="y" vertical="true"></div>
			<div class="series" name="myData" store="query_report" valueFn="Number(x)"></div>
		</div>
	</div>

Kept at it, but four days down the line, "I've got it"

<div id="simplechart" style="width: 500px; height: 300px" dojoType="dojox.charting.widget.Chart2D"
			theme="dojox.charting.themes.PlotKit.blue">
			<div class="plot" name="default" type="Bars"></div>
			<div class="axis" name="x"></div>
			<div class="axis" name="y" vertical="true"></div>
			<div class="series" name="Series 1" store="query_report" [B]field="MyAmount"  valuefn="Number(y)"[/B]></div>
		</div>

If you are to have a declarative chart that makes use of a store and the data in the store holds more than one series, e.g. {{"Month":"10", "Amount":"1000"},{"Month":"11", "Amount":"2000"}},

You have to have;
1. The field="The field you wish to plot", in my case field="MyAmount" and
2. The valuefn="Number(x)", I do not know why but changing it to valuefn="Number(y)" does not have a change on the way the chart renders.

Hi, I have been trying to get my way round the DOJO charting using the declarative (html) method.

1. I have a ItemFileReadStore for the data source

2. I know the data store has data as I am outputting it to a grid as well.

The only thing that appears is the axes and the numbering for the x axis, there is no line and the numbering for the y - axis, tried googling, but to no avail.

Please assist.

Thanks in advance.

<span dojoType="dojo.data.ItemFileReadStore" id="query_report" jsId="query_report" clearOnClose="true" url="http://localhost/index.php/sales1_controller/GetTotalRevenue/2011" ></span>

	<div class="gridContainer">

		<div dojoType="dojox.charting.widget.Chart2D" id="chart1" style="width: 500px; height: 500px;" store="query_store">
			<div class="plot" name="default" type="Lines"></div>
			<div class="axis" name="x"></div>
			<div class="axis" name="y" vertical="true"></div>
			<div class="series" name="myData" store="query_report" valueFn="Number(x)"></div>
		</div>
	</div>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.