I've been working with simple charting using UltraWebChart, but now I'm getting to multiple series data and can't get my series data to stay together. I'm grouping Quarterly data for 3 data types and building a datatable as my datasource as follows:
First i populate an array
array(0,0)="Cats"
array(0,1)="10"
array(0,2)="11"
array(0,3)="8"
array(1,0)="Dogs"
array(1,1) ="7"
array(1,2)="6"
array(1,3)="7"
array(2,0)="Total"
array(2,1)="16"
array(2,2)="20"
array(2,3)="10"
Then I add columns to the datatable as:
dt.Columns.Add("Period",GetType(System.String))
dt.Columns.Add("1Q FY09", GetType(System.Int64))
dt.Columns.Add("2Q FY09", GetType(System.Int64))
dt.Columns.Add("3Q FY09", GetType(System.Int64))
Then I add the rows as:
dt.Rows.Add(New Object() {array(0,0).ToString, array(0,1).ToString, array(0,2)ToString, array(0,3.ToString})
dt.Rows.Add(New Object() {array(1,0).ToString, array(1,1).ToString, array(1,2)ToString, array(1,3.ToString})
dt.Rows.Add(New Object() {array(2,0).ToString, array(2,1).ToString, array(2,2)ToString, array(2,3.ToString})
What I end up with is:
Swapping rows and columns didn't help and tried UseRowLabelsColumns, RowLabelsColumn=0, but that didn't help either.
Surely it is something fundamental I'm missing, right? Am I not building the datatable correctly? Please help!! Thanks much!
Thanks that did the trick. The intellisense wasn't coming up when I first tried it there, so I didn't think that was where to do it.
Look into the first few lines of your HTML:
<ColumnChart> <ChartText> <igchartprop:ChartTextAppearance ChartTextFont="Arial, 7pt" Column="-2" ItemFormatString="<DATA_VALUE:0.###>" Row="-2" VerticalAlign="Far" Visible="True" /> </ChartText></ColumnChart>
As for the formatting, personally, I use Notepad++ to copy and paste my code. It doesn't have the nice color coding, but makes it easier to read.
I'm missing it somewhere, here is the html code(based on the chart code you sent me) that I am using: (sorry about the formatting)
="Data Not Available"
="750px">
>
="-2"
="True">
="1"
/>
="<DATA_VALUE:0.####>"
="False">
="Horizontal"
="Center">
="Auto">
="VerticalLeftFacing"
="<DATA_VALUE:00.####>"
=""
="CustomLinear">
You need to change the format string of your chart text item in chart.ColumnChart.ChartText collection. By default the format string for data values is formatted with 0.##, meaning that it defaults to 2 decimal places. Try setting the format string to <DATA_VALUE> or <DATA_VALUE:0.###> or even <DATA_VALUE:n3>. You can add more decimal places if you need to.
The values are as follows: for 1QFY09: CATS=.01, DOGS=.009, Total=.009, 2QFY09: CATS=.011, DOGS=.008, TOTAL=.009, 3QFY09: CATS=.002, DOGS=.007, TOTAL=.009. However, they are all showing as .01, I'm not sure where the format setting is made. The screen shot is below