on ‎2010 Feb 04 7:44 PM
Hi,
It is possible to render a non date/time based resultset using a line chart?
I am trying a very simple resultset from a SQL Query:
-------------------
desc val
-------------------
desc1 10
desc2 15
desc3 30
desc4 55
-------------------
I've created an iChart based on this resultset. If I set "val" field to "Value columns" and "desc" field to "Label columns" I get an empty Line Chart.
If I change the Chart type to "Bar" the bars are correctly displayed.
Does line chart support a non date/time field in x-axis?
Thank you.
Wilson Freitas
Request clarification before answering.
Yes, just switch to Custom chart mode and you'll have more control over the data mapping columns. In this line trend you will have equally distributed points in the xaxis. The beauty of the Line chart mode with a time based query is that the points will be placed at the appropriate location relative to the time, so in your case a Custom chart should work quite nicely.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jeremy,
Thank you for your answer. I had tried using the custom chart but I've failed to make it to work. Then I realized I had to add the label field to "Data Link Columns" when using Custom Charts.
BTW I am now able to render the line chart. The problem I am facing now is the chart legend is not showing the values from the desc field anymore because I had to move the label field from "Label columns" to "Data link columns".
If I add the desc field to "Label Columns" the legend is rendered but the line chart becomes messed. The customer asked for a line chart with the descriptions in the label because I need to trigger events from the labels using javascript. I've read in this forum that the only way to trigger events from charts is by clicking on labels, that's why I need the descriptions on labels.
Thank you.
Wilson Freitas
The Legend can be configured to show the 'TagName' and / or the 'Description' and by default it will show whatever your value column name is.
If you look at the mapping tab you'll see min,max,desc type fields that emulate the xml attributes in the column section. Tag queries to a trend chart pull from here automatically, so with server scaling the Y axis shows MinRange to MaxRange and the description shows up under the xaxis.
If you are feeding the chart from a TRX then make sure to put what you want into the Description column attribute for whatever you are mapping into the value columns. (test the XacuteQuery in text/xml and look at the columns section).
If the Description is an extra column in your dataset then you can map it into the Description field and the chart will use that one instead of the tag meta-data in the column section.
If you enable markers in your line chart then you can also use the ChartSelectionEvent or the ChartDoubleClickEvent to fire based upon the specific data point they touched.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.