Pending Review
Last Updated: 30 Nov 2015 15:11 by robert hutchison
robert hutchison
Created on: 30 Nov 2015 15:11
Category: HtmlChart
Type: Feature Request
0
html5 Chart - Specify Series name in Data
Hi,

What I see in the HTML chart control is almost what I need.  The closest that I can get to a "generic chart" (with everything specified in the data) is binding to the XMLDataSource, but even with that, it appears that the Series Name needs to be hard-coded (not included in the XML data) or we need to write code to replace a hard-coded value with an "out of band" supplied value for each of the series names.

I've been looking through all of the demos and it appears that in every one of them, labels or titles that appear on the graph show up in the code somewhere.  Then when I look at the documentation, there is no place where those labels or titles can be extracted from the data source.  This would indicate to me that every graph needs to be hard-coded.

Am I missing something?  I hope so.  We have potentially thousands of graphing possibilities that we need to implement and would like the user to be able to design their own and this control looks pretty good, except for the "hard-coding" thing.  If we could retrieve the series names from the XML input, the task would take days; if we need to individually code each chart, it will take months to staff-years.

Here is a sample of what the XML input could look like:

<chart caption='Error Summary by Day'>
	<categories>
		<category label='Nov+11' />
		<category label='Nov+12' />
		<category label='Nov+13' />
		<category label='Nov+14' />
		<category label='Nov+15' />
		<category label='Nov+16' />
		<category label='Nov+17' />
		<category label='Nov+18' />
		<category label='Nov+19' />
		<category label='Nov+20' />
		<category label='Nov+21' />
		<category label='Nov+22' />
		<category label='Nov+23' />
		<category label='Nov+24' />
		<category label='Nov+25' />
		<category label='Nov+26' />
		<category label='Nov+27' />
		<category label='Nov+28' />
		<category label='Nov+29' />
		<category label='Nov+30' />
	</categories>
	<dataset seriesname='Notes'>
		<set value='0' />
		<set value='0' />
		<set value='0' />
		<set value='3' />
		<set value='3' />
		<set value='4' />
		<set value='5' />
		<set value='5' />
		<set value='3' />
		<set value='3' />
		<set value='2' />
		<set value='2' />
		<set value='0' />
		<set value='0' />
		<set value='0' />
		<set value='0' />
		<set value='0' />
		<set value='0' />
		<set value='0' />
		<set value='0' />
	</dataset>
	<dataset seriesname='Warnings'>
		<set value='0' />
		<set value='0' />
		<set value='0' />
		<set value='0' />
		<set value='0' />
		<set value='2' />
		<set value='2' />
		<set value='3' />
		<set value='3' />
		<set value='4' />
		<set value='4' />
		<set value='5' />
		<set value='6' />
		<set value='4' />
		<set value='3' />
		<set value='2' />
		<set value='0' />
		<set value='0' />
		<set value='0' />
		<set value='0' />
	</dataset>
	<dataset seriesname='Errors'>
		<set value='74' />
		<set value='74' />
		<set value='74' />
		<set value='74' />
		<set value='76' />
		<set value='76' />
		<set value='76' />
		<set value='71' />
		<set value='71' />
		<set value='64' />
		<set value='64' />
		<set value='64' />
		<set value='54' />
		<set value='44' />
		<set value='44' />
		<set value='31' />
		<set value='31' />
		<set value='21' />
		<set value='22' />
		<set value='12' />
	</dataset>
</chart>

You would use an XML attribute to specify series and chart names.

Thanks,
Rob
0 comments